开发者

iOS trouble with changing launch view

开发者 https://www.devze.com 2023-01-13 03:33 出处:网络
So I have a functional search app that searches through our company directory.Right now the la开发者_如何学Gounch screen goes right too the table with a toolbar to search.I want to modify the interfac

So I have a functional search app that searches through our company directory. Right now the la开发者_如何学Gounch screen goes right too the table with a toolbar to search. I want to modify the interface to launch to a google-esque view with just a simple search bar. I have created a new view and viewController but when I try to add it to the window, it says "View is not a member of struct or union". Here is what I am trying to do:

    [window addSubview:launchController.view];   //THIS IS THE LINE
[window makeKeyAndVisible];

There was formerly another view in there, but I just tried to substitute the views out. For example: I formerly had another view named "toolbarSearchView" load and that worked. They are both subclasses of UIViewController. Does anyone have an idea of what may be causing this behavior? Thanks!


check if the syntax [launchController view] works. If not, then perhaps launchController isn't a subclass UIViewController.

Or perhaps you declared it as UIViewController launchController; instead of UIViewController* launchController;

0

精彩评论

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