开发者

How to handle views?

开发者 https://www.devze.com 2023-01-15 15:27 出处:网络
How can I handle different views in XCode? Let\'s say I want to show a different view when the user press 开发者_开发百科a button.

How can I handle different views in XCode?

Let's say I want to show a different view when the user press 开发者_开发百科a button.

UIViewController *viewSettings;
[viewSettings initWithNibName:(NSString *)@"SettingsViewController" bundle:(NSBundle *)nil];

This code don't work. The app crashes.

I have updated my XCode to the new version. How can I say my projects that they have to take the new SDK?

Thanks.


This is the correct line. Then you need to push it (pushViewController) onto a UINavigationController or add it to an existing view. Do a Google search for iPhone Beginner Tutorial First Application or something like that.

UIViewController *viewSettings = [SettingsViewController initWithNibName:@"SettingsViewController" bundle:nil];


1) You use a UIViewController to manage the view stack and ultimately which view is visible.

2) In your xCode project, modify the project or target "Base SDK" property. This will let you choose the minimum version of iOS to require of your users.


You need to read the Apple documentation for view controllers There are also some very good beginner books out there for iPhone programming

0

精彩评论

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