开发者

how to change the order of views in my iphone application?

i have created an application but now i ha开发者_JAVA技巧ve added some other views in it and now i want to make the new view as my first page.....is it possible??


You might need to provide a bit more details to get an accurate answer. Assuming you have multiple UIViews in a containing UIView, a few things to look at are:

UIView:

- (void)bringSubviewToFront:(UIView *)view
- (void)sendSubviewToBack:(UIView *)view
- (void)insertSubview:(UIView *)view aboveSubview:(UIView *)siblingSubview
- (void)insertSubview:(UIView *)view atIndex:(NSInteger)index


edit your AppDelegate.m file

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {        
// Override point for customization after application launch.
// Add the view controller's view to the window and display.
[window addSubview:viewController.view1];//you may add view2, view3
[window makeKeyAndVisible];

return YES;

}

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜