-
Notifications
You must be signed in to change notification settings - Fork 9
[ZH] SDK开始与结束
Gyeonghwan edited this page Aug 4, 2016
·
1 revision
NAVER Cafe SDK选择特定标签的状态下开始或结束NAVER Cafe SDK。
运行NAVER Cafe SDK。
(void)presentMainViewController;
以下是运行presentMainViewController: 方法的举例。
/*
运行NAVER Cafe SDK
*/
[[NCSDKManager getSharedInstance] presentMainViewController];
选择特定标签的状态下,打开NAVER Cafe SDK画面。
(void)presentMainViewControllerWithTabIndex:(NSUInteger)tabIndex;
以下是运行presentMainViewControllerWithTabIndex: 方法的举例。
typedef NS_ENUM(NSUInteger, GLTabType) {
kGLTabTypeHome = 0,
kGLTabTypeNotice = 1,
kGLTabTypeEvent = 2,
kGLTabTypeMenuList = 3,
kGLTabTypeProfile = 4,
};
/*
以NAVER Cafe主页TabIndex运行
*/
// 公告
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeNotice];
// 活动
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeEvent];
// 论坛列表
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeMenuList];
// 用户信息
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeProfile];
打开论坛帖子的状态下,打开NAVER Cafe SDK画面。
(void)presentMainViewControllerWithArticleId:(NSUInteger)articleId;
以下是运行presentMainViewControllerWithArticleId: 方法的举例。
/*
转到NAVER Cafe文章
*/
[[NCSDKManager getSharedInstance] presentMainViewControllerWithArticleId:36];
打开论坛写文章画面。
(void)presentArticlePostViewControllerWithMenuId:(NSInteger)menuId subject:(NSString *)subject content:(NSString *)content;
以下是运行presentArticlePostViewControllerWithMenuId: 方法的举例。
/*
运行NAVER Cafe写文章画面
*/
[[NCSDKManager getSharedInstance] presentArticlePostViewControllerWithMenuId:10 subject:@"제 점수는요" content:@"100점?"];
上传图片文件或视频文件的状态下,打开论坛写文章画面。
(void)presentArticlePostViewControllerWithType:(GLArticlePostType)type menuId:(NSInteger)menuId subject:(NSString *)subject content:(NSString *)content filePath:(NSString *)filePath;
以下是运行presentArticlePostViewControllerWithType: 方法的举例。
typedef NS_ENUM(NSUInteger, GLArticlePostType) {
kGLArticlePostTypeImage = 1,
kGLArticlePostTypeVideo = 2,
};
...
// 上传图片
[[NCSDKManager getSharedInstance] presentArticlePostViewControllerWithType:kGLArticlePostTypeImage menuId:10 subject:@""
// 上传视频
[[NCSDKManager getSharedInstance] presentArticlePostViewControllerWithType: kGLArticlePostTypeVideo menuId:10 subject:@"" content:@"" filePath:@""];
结束NAVER Cafe SDK。
(void)dismissMainViewController;
以下是运行dismissMainViewController: 方法的举例。
/*
结束NAVER Cafe SDK
*/
[[NCSDKManager getSharedInstance] dismissMainViewController];