开发者

Problem in subView

开发者 https://www.devze.com 2023-02-26 03:46 出处:网络
-(IBAction)textFieldDoneEditing:(id) sender { [textInfo resignFirstResponder]; [self.navigationController setNavigatio开发者_运维知识库nBarHidden:NO animated:YES];
 -(IBAction)textFieldDoneEditing:(id) sender {
[textInfo resignFirstResponder];
[self.navigationController setNavigatio开发者_运维知识库nBarHidden:NO animated:YES];
[self.view addSubview:(UITableViewController*)informationTableView];// don't Work 
 }

expected expression before 'informationTableView'

I want to have this view when he clicks on the keyboard end


your below statement is wrong

  [self.view addSubview:(UITableViewController*)informationTableView];// will never work

Check correct one below.

UIView* MyView = (UITableViewController*)informationTableView.view ;

[self.view addSubview:MyView];

MyView must a subclass of UIView,

Q. Let me know the class name and it's super class name of informationTableView.


If UITableViewController is UIViewController you have to do like this

[self.view addSubview:[(UITableViewController*)informationTableView].view];

Hope this helps.

0

精彩评论

暂无评论...
验证码 换一张
取 消