Question

I have been trying for a while now, but I can't figure out how to integrate InAppSettingsKit in an App, that uses Storyboard and a TabBar.

I've got my tab bar defined in a Storyboard, now I want one tab to have this InAppSettingsKit as the root view. Is this possible after all?

Thanks everyone.

Was it helpful?

Solution

Well, after trying various things, I figured out, that my problem actually was, that I put all the IASK-stuff into a static library (and I had no Settings Bundle). After moving all the code and nibs to the same project as the MainStoryboard, it worked by adding a TableView Controller to my storyboard and settings its custom class to IASKAppSettingsViewController.

OTHER TIPS

Alternatively, if you want button handlers and other custom code, do following:

  1. Create a class derived from UITableViewController
  2. Modify the header file to derive from IASKAppSettingsViewController <IASKSettingsDelegate> Remove all methods but the initWithCoder and the settingsViewControllerDidEnd protocol (or make calls to super). This is so that the default UITableVC code doesn't override IASK functionality. Be sure to stick self.delegate = self; into the initWithCoder to get the buttons to work.

    //SettingsViewController.h
    #import "IASKAppSettingsViewController.h"
    
    @interface SettingsViewController : IASKAppSettingsViewController <IASKSettingsDelegate>
    @end
    
    
    //SettingsViewController.m
    // ...
    - (id)initWithCoder:(NSCoder *)aDecoder
    {
        self = [super initWithCoder:aDecoder];
        if (self) {
            self.delegate = self;
        }
        return self;
    }
    
    #pragma mark -
    #pragma mark IASKAppSettingsViewControllerDelegate protocol
    - (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender {
        [self dismissViewControllerAnimated:YES completion:nil];
    }
    
  3. Set custom class of the table view in storyboard to your class

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top