Skip to content

[JA] SDKの開始と終了

Gyeonghwan edited this page Aug 4, 2016 · 1 revision

SDKの開始と終了

NAVER Cafe SDKを特定のタブが選択された状態で開始したり、NAVER Cafe SDKを終了します。

presentMainViewController: メソッド

NAVER Cafe SDKを実行します。

(void)presentMainViewController;

presentMainViewController: メソッドの実装例を示します。

/*
 NAVER Cafe SDK実行
 */
[[NCSDKManager getSharedInstance] presentMainViewController];

presentMainViewControllerWithTabIndex: メソッド

特定のタブが選択された状態で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のメインタブIndexで実行
 */
// お知らせ
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeNotice];
// イベント
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeEvent];
// 掲示板リスト
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeMenuList];
// プロフィール
[[NCSDKManager getSharedInstance] presentMainViewControllerWithTabIndex:kGLTabTypeProfile];

presentMainViewControllerWithArticleId: メソッド

掲示板の記事が開いた状態で画面を開きます。

(void)presentMainViewControllerWithArticleId:(NSUInteger)articleId;

presentMainViewControllerWithArticleId: メソッドの実装例を示します。

/*
 NAVER Cafe記事へ移動
 */
[[NCSDKManager getSharedInstance] presentMainViewControllerWithArticleId:36];

presentArticlePostViewControllerWithMenuId: メソッド

掲示板の書き込み画面を開きます。

(void)presentArticlePostViewControllerWithMenuId:(NSInteger)menuId subject:(NSString *)subject content:(NSString *)content;

presentArticlePostViewControllerWithMenuId: メソッドの実装例を示します。

/*
 NAVER Cafe書き込み画面実行
 */
[[NCSDKManager getSharedInstance] presentArticlePostViewControllerWithMenuId:10 subject:@"わたしの点数は" content:@"100点?"];

presentArticlePostViewControllerWithType: メソッド

画像ファイルや動画ファイルが添付された状態で掲示板の書き込み画面を開きます。

(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:@""];

dismissMainViewController: メソッド

NAVER Cafe SDKを終了します。

(void)dismissMainViewController;

dismissMainViewController: メソッドの実装例を示します。

/*
 NAVER Cafe SDK終了
 */
[[NCSDKManager getSharedInstance] dismissMainViewController];

Other NAVER CAFE SDK Documents.

Unity

Unreal

Cocos-2dx

Android

Clone this wiki locally