andreamazz / andreamazz/SlideOutNavigation

Is it possible to use SlideOutNavigation w/ existing navController?

オープン
#76 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Objective-C
スター
207
フォーク
49
PR マージ指標
30日以内にマージされた PR はありません

説明

I'm using tab group as my main navigation and SlideOutNavigation just as a secondary menu to execute some actions (e.g change some preferences without navigating away from the TabGroup controller)

So far I'm getting double navbars (one from SlideOutNavigation and one from TabGroup). Is it possible to remove the SlideOutNavigation navbar at all? I just the button that opens the sidemenu, really. Which brings me to my second question: since I'm only executing actions in the sidemenu and not navigating away to other views.. how do I hide the original tabgroup controller from the sidemenu? I'm guessing not_adding it to the sidemenu is not an option since it needs at least one real view controller there? Otherwise I'm getting an empty initial screen.

btw I'm using you extension in a Swift project. so cool! Here's my code if it helps in any way:

```
var window: UIWindow?
var storyboard: UIStoryboard?
var controller:UIViewController?
let slideoutController:AMSlideOutNavigationController = AMSlideOutNavigationController.slideOutNavigation() as AMSlideOutNavigationController

func application(application: UIApplication!, didFinishLaunchingWithOptions launchOptions: NSDictionary!) -> Bool {

self.storyboard = UIStoryboard(name: "Main", bundle: nil)

self.slideoutController.addSectionWithTitle("Hello")
self.slideoutController.setSlideoutOptions(AMSlideOutGlobals.defaultFlatOptions())
//self.slideoutController.setSlideoutOptions([AMOptionsSlideValue:200, AMOptionsAnimationShrinkValue: 0.2])

self.slideoutController.setSlideoutOptions([AMOptionsAnimationShrink: false, AMOptionsAnimationDarken: false,AMOptionsAnimationSlide: true, AMOptionsAnimationSlidePercentage: 0.5, AMOptionsSlideValue:200])
// Adding first controller

self.controller = self.storyboard!.instantiateViewControllerWithIdentifier("TabGroup") as? UIViewController

self.slideoutController.addViewControllerToLastSection(controller, tagged: 1, withTitle: "My app", andIcon: "")

self.slideoutController.addAction({
var alert = UIAlertView()
alert.title = "Message"
alert.message = "This is to inform you that an action has been executed"
alert.addButtonWithTitle("Alright")
alert.show()
}, tagged: 3, withTitle: "Do some action", andIcon: "", andSelectionIcon: "", toSection: 0)

self.window!.rootViewController = slideoutController
self.window?.makeKeyAndVisible()

return true
}
```

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。