Posts

Showing posts with the label UIKIT Framework Examples

Adding a TabBar

-(void)AddTabBar {     tabBarController=[[UITabBarController alloc] init];     UIViewController *ViewController = [[UIViewController alloc] init];     UINavigationController *PlaceOrderController = [[UINavigationController alloc] initWithRootViewController:PlaceOrderView];     PlaceOrderController.navigationBar.tintColor = [UIColor redColor];//[UIColor colorWithRed:29.123 green:16.234 blue:2.9 alpha:1.0];     PlaceOrderController.tabBarItem.title = @"";     PlaceOrderController.tabBarItem.image = [UIImage imageNamed:@"tab_place_order.png"];     [PlaceOrderView release];               [tabBarController setViewControllers:[NSArray arrayWithObjects:PlaceOrderController, nil]  animated:NO];     tabBarController.delegate=self;     tabBarController.selectedIndex=0;     [PlaceO...

UITableView

MenuTable=[[UITableView alloc] initWithFrame:CGRectMake(40,50,240,370) style:UITableViewStylePlain];      MenuTable.delegate=self;     MenuTable.dataSource=self;     MenuTable.autoresizingMask = (UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight);     [self.view addSubview:MenuTable]; - (NSInteger)tableView:(UITableView *)table numberOfRowsInSection:(NSInteger)section {     return [menuArr count];     } - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {               NSString *cellIdentifier = [NSString stringWithFormat:@"Cell%i",indexPath.row];     UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:nil];         if(cell == nil)     {         ...

UISwitch

Creating a switch CGRect frame = CGRectMake(0.0, 0.0, 60.0, 26.0); UISwitch *switchControl = [[UISwitch alloc] initWithFrame:frame]; //[switchControl addTarget:self action:@selector(action:)forControlEvents:UIControlEventTouchUpInside]; [switchControl setBackgroundColor:[UIColor clearColor]]; [self.view addSubview:switchControl];

UISwipeGestureRecognizer

UISplitViewController

UISlider

Creating a slider CGRect frame = CGRectMake(0.0, 0.0, 200.0, 10.0); UISlider *slider = [[UISlider alloc] initWithFrame:frame]; [slider addTarget:self action:@selector(sliderAction:) forControlEvents:UIControlEventValueChanged]; [slider setBackgroundColor:[UIColor clearColor]]; slider.minimumValue = 0.0; slider.maximumValue = 50.0; slider.continuous = YES; slider.value = 25.0;

UISegmentedControl

Creating a segmented control NSArray *arrayOfImages = [NSArray arrayWithObjects:[UIImage imageNamed:@"segment1_Image.png"], [UIImage imageNamed:@"segment2_Image.png"], [UIImage imageNamed:@"segment3_Image.png"], [UIImage imageNamed:@"segment4_Image.png"], nil]; UISegmentedControl *segmentedControl = [[UISegmentedControl alloc] initWithItems: arrayOfImages]; CGRect frame = CGRectMake(0.0, 120.0, 300.0, 44.0); [segmentedControl setFrame:frame]; [segmentedControl addTarget:self action:@selector(action:) forControlEvents:UIControlEventValueChanged];

UISearchDisplayController

UISearchBar

UIScrollView

UIScreenMode

UIScreen

UIRotationGestureRecognizer

UIResponder

UIProgressView

UIPopoverController

UIPinchGestureRecognizer

UIPickerView

UIPasteboard

UIPanGestureRecognizer