Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dynamic number of steps #23

Open
CooperRS opened this issue Oct 28, 2014 · 9 comments
Open

Dynamic number of steps #23

CooperRS opened this issue Oct 28, 2014 · 9 comments

Comments

@CooperRS
Copy link
Owner

Hi @narasimhaiah23:

I think I did not fully understand your request :/.

Case 1:
Are you trying to dynamically change the content the view controllers of your steps are displaying? So let's say you are viewing the first step and then a network event occurs and you want to change the content of the first step?

In this case you could use a special view controller for the first step. This special view controller dynamically changes it's content view controller on an arbitrary event.

Case 2:
Are you trying to dynamically change the number of steps that are needed to finish the process after the steps controller has been presented?

This is not possible :/

For reference the original request:

Hai @CooperRS .. I want to pass viewcontrollers dynamically.Is it possible.?I am following this code in my customer application.Please help me in this issue.There is a method called -(NSArray *)stepViewControllers right? which will give viewcontrollers array.I need these viewcontrollers to be dynamic.At run time I have to check which viewcontroller we need i will pass that viewontroller.Please reply ASAP.

@narasimhaiah23
Copy link

Hai @CooperRS . Thank you for the reply.I have a hierarchy of view Controllers and I wanted to move to any branch in the view controller list.So the number of view controllers are dynamic.

@CooperRS CooperRS changed the title Dynamic step view controllers Dynamic number of steps Oct 28, 2014
@CooperRS
Copy link
Owner Author

Your could save the data into the results dictionary. This dictionary can be accessed by the steps view controllers.

@CooperRS
Copy link
Owner Author

Every RMStepsController has a property called results. You can save data into it by using a line like follows:

[stepsController.results setObject:anObject forKey:aKey]

@CooperRS
Copy link
Owner Author

self.stepsController is only for the actual steps view controllers non nil. If you want the view controller, which is presenting the RMStepsController, to assign some data to the results dictionary then you need to do this in prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender.

You may take a look at the answer to this (http://stackoverflow.com/questions/7864371/ios-how-to-pass-prepareforsegue-an-object) question, if you need additional information on how to pass data to the presented view controller from a presenting view controller.

@CooperRS
Copy link
Owner Author

This sounds like performSegueForIdentifier:withSender: is called twice. It should only be called once of course.

@narasimhaiah23
Copy link

can you refer me some dynamic step controllers.please.

@narasimhaiah23
Copy link

Hi @CooperRS I got an exception saying "Exception is Could not find a navigation controller for segue 'ScenestoSubscenes'. Push segues can only be used when the source controller is managed by an instance of UINavigationController."

@CooperRS
Copy link
Owner Author

The error looks like your have a Segue called ScenestoSubscenes in your interface builder file. But the source view controller of that segue seems not to be a child view controller of a UINavigationViewController. That's not possible as for a push animation a UINavigationController is needed.

Unfortunately, I do not know any step controllers like mine. In particular, if you need a dynamic number of steps. If you need that functionality now I am afraid you have to implement that for yourself :/...

@narasimhaiah23
Copy link

Hai @CooperRS I spent more than 15 days on this sample.I couldn't make my manager happy that it doesnt work as required.Could you please help me like in my requirement.I wanted the same project which takes a view controller from tableview didselectrow at indexpath. In did select row at index path i have to call perform segue which is push view controller.If i call nextsteptapped: wth that viewcontroller the application should take that view controller as childviewcontroller of RMStepsController.Please help me boss.we like the UI.we only need to acceptance and work now.Please help me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants