futuretap / InAppSettingsKit

This iOS framework allows settings to be in-app in addition to or instead of being in the Settings app.
https://www.futuretap.com/blog/inappsettingskit-3-0
Other
3.19k stars 545 forks source link

Link delegate with view controller in interface builder #54

Closed sprendes closed 13 years ago

sprendes commented 13 years ago

Hi, I've copied the tab bar version from app example in my project. I can see the settings I've put in setting.bundle (root.plist), and now I cant link in IB the delegate with the ViewController, so I cant caught the events from the setting panel. In the sample app the delegate (from class IASKAppSettingsViewController in TabBar) is linked with MainViewController. How can I link with my MyViewController?

thanks a lot

futuretap commented 13 years ago

Not sure what you mean. Just Ctrl-drag in IB to create connections.

sprendes commented 13 years ago

Hi

thanks a lot for your response. I'm not now with my mac so I can't give you more details. I'll try to explain the problem.

The app sample give some alternatives for the framework. The tabbar one is the one I want include in my app.

In IB, you have a item in the tabbar with a navigation controller and in this you have a item that is a IASK???ViewController.

I have the same in my app, setting the root.plist with my options and I can see the settings screen ... but I can get the events.

In your sample app, you have linked the delegate with your MainViewController. I've created my AjustesViewController (I'm from Spain ... sorry my poor English) but I don't see this View Controller to link the delegate of the item tabbar.

I suppose that in the sample app the MainViewController is the default controller for your .xib, so you can see it in

2011/5/11 futuretap < reply@reply.github.com>

Not sure what you mean. Just Ctrl-drag in IB to create connections.

Reply to this email directly or view it on GitHub: https://github.com/futuretap/InAppSettingsKit/issues/54#comment_1138107

sprendes commented 13 years ago

sorry ... I've send the message without finish ..

continue ...

in my app, the tabbaritem with settings is not controlled by the main view controller, so I have to delegate in AjustesViewController (in this VC I have the same you have in your MainViewController)

When I arrive at home (in 2-3 hours) I'll try to subclass this AjustesViewController from your IASKViewController and the tarbbaritem will be an object from this class.

uf, I'm sorry not be able to explain better ...

thanks again santiago

2011/5/11 Santiago Prendes sprendes@gmail.com

Hi

thanks a lot for your response. I'm not now with my mac so I can't give you more details. I'll try to explain the problem.

The app sample give some alternatives for the framework. The tabbar one is the one I want include in my app.

In IB, you have a item in the tabbar with a navigation controller and in this you have a item that is a IASK???ViewController.

I have the same in my app, setting the root.plist with my options and I can see the settings screen ... but I can get the events.

In your sample app, you have linked the delegate with your MainViewController. I've created my AjustesViewController (I'm from Spain ... sorry my poor English) but I don't see this View Controller to link the delegate of the item tabbar.

I suppose that in the sample app the MainViewController is the default controller for your .xib, so you can see it in

2011/5/11 futuretap < reply@reply.github.com>

Not sure what you mean. Just Ctrl-drag in IB to create connections.

Reply to this email directly or view it on GitHub: https://github.com/futuretap/InAppSettingsKit/issues/54#comment_1138107

futuretap commented 13 years ago

You shouldn't need to subclass it. If it doesn't appear in your XIB, just add a ViewController object and set its class to IASKAppSettingsViewController.

sprendes commented 13 years ago

Ok, I was doing something like that. I saw that in your sample app, the other tabbar item (the first one, for modal and push version) is a MainViewController class. So, what I did was add a AjustesViewController (without any function) and link the delegate of the tabbar item (IASKAppSettingsViewController class) to it. And it works!!! The only thing I need was that this VC appears in IB ...

thanks again