티스토리 뷰
ios slide menu 추천!
https://github.com/aryaxt/iOS-Slide-Menu
이것저것 찾아봤지만 해본것중 가장 사용이 쉽고 편리했다.
개인적으로 스토리보드 보다는 하드코딩을 선호하는 편으로, sample 앱이 스토리보드 기반이다 보니 하드코딩으로 하려면 다음과 같이 하면 된다.
AppDelegate.m 파일
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
self.window = [[UIWindow alloc] initWithFrame:[[UIScreen mainScreen] bounds]];
MainView *vc = [[MainView alloc] init]; // Navigation Controller 의 RootViewController 가 될 View
LeftMenuViewController *leftMenu = [[LeftMenuViewController alloc] init]; // 왼쪽 메뉴 뷰 파일
SlideNavigationController *nv = [[SlideNavigationController alloc] initWithRootViewController:vc];
[nv setLeftMenu:leftMenu];
[nv setMenuRevealAnimationDuration:.18];
[nv.navigationBar setHidden:YES];
[nv.view setAutoresizingMask:UIViewAutoresizingFlexibleWidth];
//[SlideNavigationController sharedInstance].leftMenu = leftMenu;
//[SlideNavigationController sharedInstance].menuRevealAnimationDuration = .18;
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidClose object:nil queue:nil usingBlock:^(NSNotification *note) {
NSString *menu = note.userInfo[@"menu"];
NSLog(@"Closed %@", menu);
}];
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidOpen object:nil queue:nil usingBlock:^(NSNotification *note) {
NSString *menu = note.userInfo[@"menu"];
NSLog(@"Opened %@", menu);
}];
[[NSNotificationCenter defaultCenter] addObserverForName:SlideNavigationControllerDidReveal object:nil queue:nil usingBlock:^(NSNotification *note) {
NSString *menu = note.userInfo[@"menu"];
NSLog(@"Revealed %@", menu);
}];
[self.window setRootViewController:nv];
[self.window makeKeyAndVisible];
return YES;
}
- Total
- Today
- Yesterday
- mysql
- OpenCV
- php
- 사물인터넷
- 미세먼지
- IOT
- 파이썬
- ios
- 아이폰
- 엘라스틱서치
- 머신러닝
- 인공지능
- xcode
- object-C
- 딥러닝
- 라즈베리파이
- ubuntu
- 공기청정기
- Python
- 스위프트
- 아두이노
- Android
- 캠핑
- 리눅스
- swift
- 서버
- diy
- Deeplearning
- 강좌
- 우분투
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |