Saturday, 29 December 2012

To open a new view using navigation control with row selected item



DetailViewController *dvController = [[DetailViewController alloc] 

[self.navigationController pushViewController:dvController animated:YES];

        

To set text inside a alert box text can be a user entered string





UIAlertView* alert = [[UIAlertView alloc] initWithTitle:@"Selected Country" message:@"You have selected\n\n\n" delegate:self cancelButtonTitle:nil otherButtonTitles:@"Ok", nil];
        UILabel *textField;
        textField = [[UILabel alloc] init];
        [textField setBackgroundColor:[UIColor whiteColor]];
        textField.frame = CGRectMake(15, 75, 255, 30); 
        textField.text = @"text";
        textField.textAlignment = UITextAlignmentCenter;
        [alert addSubview:textField];
        [alert show];

UITableViewCellAccessoryDetailDisclosureButton





- (UITableViewCellAccessoryType)tableView:(UITableView *)tableView accessoryTypeForRowWithIndexPath:(NSIndexPath *)indexPath {
//return UITableViewCellAccessoryDetailDisclosureButton;
return UITableViewCellAccessoryDisclosureIndicator;
}


IPHONE SIZE SPECIFICATIONS






             MODEL                         SIZE

    

            IPHONE                 480 × 320 px (HVGA) at 163 ppi
            IPHONE-3G            480 × 320 px (HVGA) at 163 ppi
            IPHONE-3GS          480 × 320 px (HVGA) at 163 ppi
            IPHONE-4              960 × 640 px at 326 ppi
            IPHONE-4S            960 × 640 px at 326 ppi
            IPHONE-5              1,136 × 640 px at 326 ppi