This question already has an answer here:
- iOS 7: UITableView shows under status bar 22 answers
how can do that "apple" stay under status bar and not into status bar?
Thanks in advance everybody!
this is my file.xib:
this is my code updated but it doesn't work....
- (void)viewDidLoad
{
[super viewDidLoad];
// Do any additional setup after loading the view, typically from a nib.
arOptions = [[NSMutableArray alloc] init];
/* for(int i = 1; i <= 20; i++) {
[arOptions addObject:[NSString stringWithFormat:@"Option %i", i]];
}*/
[arOptions addObject:@"Apple"];
[arOptions addObject:@"Mango"];
[arOptions addObject:@"Papaya"];
[arOptions addObject:@"Guava"];
[arOptions addObject:@"Pineapple"];
[arOptions addObject:@"Strawberry"];
[arOptions addObject:@"Banana"];
[arOptions addObject:@"Grapes"];
[arOptions addObject:@"Pomegranate"];
[arOptions addObject:@"Green Tea"];
[arOptions addObject:@"Raisin"];
arSelectedRows = [[NSMutableArray alloc] init];
UITableView *tblOptions = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height - 50) style:UITableViewStylePlain];
tblOptions.delegate = self;
tblOptions.dataSource = self;
[self.view addSubview:tblOptions];
**self.edgesForExtendedLayout=UIRectEdgeNone;
self.extendedLayoutIncludesOpaqueBars=NO;
self.automaticallyAdjustsScrollViewInsets=NO;**
UIButton *btnAlert = [UIButton buttonWithType:UIButtonTypeRoundedRect];
btnAlert.frame = CGRectMake(20, self.view.frame.size.height - 50 + 5, self.view.frame.size.width - 20 - 20, 50 - 10);
[btnAlert setTitle:@"Get_answer" forState:UIControlStateNormal];
[btnAlert addTarget:self action:@selector(btnAlertTapped:) forControlEvents:UIControlEventTouchUpInside];
[self.view addSubview:btnAlert];
}
Aucun commentaire:
Enregistrer un commentaire