开发者

Control UIView on Load

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜