开发者

Control UIView on Load

开发者 https://www.devze.com 2023-02-24 08:36 出处:网络
Hi everybody I am trying to make an app with a login page and profile page. So i am usin开发者_开发百科g two view for them : login_view and profile_view

Hi everybody I am trying to make an app with a login page and profile page.

So i am usin开发者_开发百科g two view for them : login_view and profile_view

So login_view is my view in nib file i.e default view.

but i want to check if the user has already signed in before in viewdidLoad method like session and show him profile_view instead when app starts.

Can Anybody help me in it?

I tried this but failed

NSArray *array = [[NSArray alloc] initWithContentsOfFile:filePath];
        if ([array count] == 0) 
        {
            NSNumber * uud = [array objectAtIndex:0];
            [self.view = home];

        }


Might want to use a keychain. If not, you could run the risk of having unauthorized access. Lot's of other reasons too. This sample app by Apple should help you:

http://developer.apple.com/library/ios/#samplecode/GenericKeychain/Introduction/Intro.html

0

精彩评论

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