0

i have a code here

@interface FFRightSidebarController ()
@property (nonatomic, strong) FFActivitiesController *activitiesController;
@property (nonatomic, strong) FFSidebarTableController *dummy2;
@end

so basically RightSidebarController instance holds an instance of activitiesController

the question is:

can i get the instance of rightsidebarcontroller from activitiescontroller (getting the instance of an instance):

it was basically like getting the view controller of a UIView like in this link here.

just in this case, it is viewController to ViewController.

if it's not clear enough please ask me.. Thanks ahead..

Community
  • 1
  • 1
Vik2r
  • 145
  • 1
  • 2
  • 7

2 Answers2

1

you can use this link if you want to access parentViewController

To access the parent View controller u can use self.parentViewController. Once you have it you can access its view simply by using its view property

Please let me know if it solves your problem.

hope this helps.

Community
  • 1
  • 1
iEinstein
  • 2,100
  • 1
  • 21
  • 32
  • i tried this one sir.. but it was returning nil. maybe activitiesController is not a childController of Rightsidebarcontroller since it was not set as its child view controller.. thanks for the suggestion sir.. – Vik2r Dec 16 '13 at 07:16
  • Ok no problem. First check your code and if it is not still being solved you can come again – iEinstein Dec 16 '13 at 07:18
  • i'll accept this as an answer as this gave me adea that all i have to do is to add activitiesController to childController of RightSidebarController with method addChildViewController:. thanks.. – Vik2r Dec 16 '13 at 08:53
0

There is a Project Over here with detailed explaination of the Sliding ViewControllers for all the possible ways .

Kumar KL
  • 15,315
  • 9
  • 38
  • 60
  • How did you know he needs this project. Instead of Providing simple answer you are distributing project :) – iEinstein Dec 16 '13 at 07:02
  • See, He is exactly wants to show the one of ViewController as the side rolling View on the ViewController. Here can't show for whole of a simple project here. and one more thing, I'm just suggesting the way . – Kumar KL Dec 16 '13 at 07:05
  • I think you are guessing only seeing FFRightSidebarController class name. But problem can be in various form that wouldn't suit the link you provide. If you know the answer you can simply write here instead of searching in whole here and there – iEinstein Dec 16 '13 at 07:07
  • sir, i was currently working with ViewDeck library for sliding controller. it's just every time i call viewDeckController method. i was returned null. maybe because the rightsidebarcontroller was the one wrapped in the rightcontroller of ViewDeck.. I'll check if it. helps. thanks sir.. – Vik2r Dec 16 '13 at 07:10