UITextField *field = [[UITextField alloc]initWithFrame:CGRectMake(10, 10, 200, 100)];
field.text = @"sample";
field.contentVerticalAlignment = UIControlContentVerticalAlignmentCenter;
[self.view addSubview:field];
高さをUITableViewCellの高さに合わせればOK
-----------------------------------------------------
UINavigationbarの右にボタンを加える。storyboardではできないからね
UIBarButtonItem *send = [[UIBarButtonItem alloc]initWithTitle:@"保存"
style:UIBarButtonItemStyleDone
target:self
action:@selector(saveSetting:)];
self.navigationItem.rightBarButtonItem = send;
こんな感じかなー
No comments:
Post a Comment