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.18k stars 546 forks source link

How do i get tap event of a row? #209

Closed mtozlu closed 11 years ago

mtozlu commented 11 years ago

Hi, I'm using IASK as a tabbar item. I subclassed IASKViewController like this:

@interface SettingsViewController : IASKAppSettingsViewController <IASKSettingsDelegate, UITableViewDelegate>

I have a list of values nested under a group which are basically names of audio files in my app. They are under another group so this means there is a navigation controller and this list is not on the main settings view, it is on the second level of navigation. I want to play the corresponding audio file when user taps the row. But i could not get the tap event either by 'didDeselectRowAtIndexPath' or 'didSelectCustomViewSpecifier'.

Could you please tell me what to do in order to get this working?

Thank you.

futuretap commented 11 years ago

Do I understand correctly that your list of audio files is in a MultiValue list? Currently, I'm afraid, there's no delegate callback when cells in a IASKSpecifierValuesViewController are tapped.

I suggest using a custom view controller to display the available audio files and play them on tap.

mtozlu commented 11 years ago

My list of audio files are in a UITableView. I dont know if this is same as MultiValue list. But i wrote them one by one to the .plist file. I get the value from IASK and play corresponding file.

Is there a delegate callback when cells in UITableView are tapped (the tableview is created automatically by IASK)?

futuretap commented 11 years ago

Can you show me the relevant part of your plist?

mtozlu commented 11 years ago

Thanks,

This is my Settings.bundle > Root.plist 1

This is the IASK main window attached to tabbar (Settings tab) 2

and when user taps on "Alarm" this screen comes up. When user clicks on a value, it is saved into Settings. What i want is at the same time, the sound should start playing. Because the user would like to hear the sound before setting it as alarm. I can play mp3s in my app but how do i get it to play the 'tapped on' sound. 3

futuretap commented 11 years ago

You could listen to the kIASKAppSettingChanged notification and play the selected sound then.

Am 20.07.2013 um 09:50 schrieb 1dot44mb notifications@github.com:

Thanks,

This is my Settings.bundle > Root.plist

This is the IASK main window attached to tabbar (Settings tab)

and when user taps on "Alarm" this screen comes up. When user clicks on a value, it is saved into Settings. What i want is at the same time, the sound should start playing. Because the user would like to hear the sound before setting it as alarm. I can play mp3s in my app but how do i get it to play the 'tapped on' sound.

\ Reply to this email directly or view it on GitHub.

mtozlu commented 11 years ago

So this means, i will subclass IASK with my own SettingsViewController. And in my viewcontroller, i will override "kIASKAppSettingChanged" and get the property. Did i get it correctly?

Thanks for answering.

futuretap commented 11 years ago

No you don't need to subclass. Just observe the notification. Check the Readme for details.

Am 21.07.2013 um 12:55 schrieb 1dot44mb notifications@github.com:

So this means, i will subclass IASK with my own SettingsViewController. And in my viewcontroller, i will override "kIASKAppSettingChanged" and get the property. Did i get it correctly?

Thanks for answering.

\ Reply to this email directly or view it on GitHub.

mtozlu commented 11 years ago

I was trying to observe the notification in IASKAppSettingsViewController with no success. After some trials, i found that PSMultiValue kISAKAppSettingChanged notification is being posted in IASKSpecifierValuesViewController. Now i am able to do what i want.

Many thanks for directions.