Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

erdinc27

macrumors regular
Original poster
Jul 20, 2011
168
1
Hi all. I implemented SwRevealViewController in my project. I used to use it in many projects. But in this one i had to have a right view controller also. The problem i face is that in the project i have two kind of users. One of that users will have Right view Controller another one can not. How can i block right view controller if the user doesnt have to have it ?
 

1458279

Suspended
May 1, 2010
1,601
1,521
California
Hi all. I implemented SwRevealViewController in my project. I used to use it in many projects. But in this one i had to have a right view controller also. The problem i face is that in the project i have two kind of users. One of that users will have Right view Controller another one can not. How can i block right view controller if the user doesnt have to have it ?
I assume you have some flag that is set after the user logs in. What I do with SWReveal is set, on the fly, the hidden vc.

I set an array of info, when the user double taps the header, it changes the content of the VC on the left. If I wanted to, I could simply check the flat for which content the user has rights to would be controlled by inside the array with a flag.

You could also just load each VC based on which user is logged in. If you need to log people in, you can use things like a singleton or pass info around in an array. Maybe a user settings file.

I was going to cut-n-paste some code, but it looks like it wants to bring a bunch of junk with the code.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.