PDA

View Full Version : Password Protected Table View?




ljg93
Apr 10, 2011, 10:17 PM
hey everyone,

I was wondering how to make a table view that would have like 5 rows in it, that is no problem to do i know, but i was wondering how i could make so each cell in the table view would need a different password to get into it.

I am asking my girlfriend to prom, so i am making a scavenger hunt thing for her based of my iphone..

any idea how to make the password thing happen?



Sykte
Apr 11, 2011, 07:07 AM
hey everyone,

I was wondering how to make a table view that would have like 5 rows in it, that is no problem to do i know, but i was wondering how i could make so each cell in the table view would need a different password to get into it.

I am asking my girlfriend to prom, so i am making a scavenger hunt thing for her based of my iphone..

any idea how to make the password thing happen?


From the sounds of it, security really isn't an issue. On that note create a NSArray, add 5 NSString (these will hold your passwords) into the array. Make sure they are in the same order of your UITableView rows. You can then compare by the returned row.

jnoxx
Apr 12, 2011, 06:28 AM
Like the person above me said. U can make a function on "didselectrowatindexpath". and depending on ur tableview cell, u can input an password depending on an NSArray.
Then check the text inputted based on the NSArray index :)
Something like that.
Or u could take a different angle, and use a alertview, and depending on the button, it can take her to the next level (meh, nevermind that idea, too easy).