Fabricを使ったツイッターの自動ログイン
Fabricを使ったツイッターのログイン方法はボタンを押したり、iPhoneに登録してあるアカウントを使ったやり方が一般的ですが、STTwitterにあるUserIDやUserNameを使った実装がなかなか見つかりませんでした。
自分しか使わないアプリなどは
ボタンやアカウントを使った一般的な方法↓
Log In with Twitter — Fabric for Apple documentation
備忘録のためログイン方法を残しておきます
twitter - TwitterKit: Manually create a TWTRSession - Stack Overflow
↓これでログインできました。
TWTRSession *session = [[TWTRSession alloc] initWithAuthToken:@"AUTH TOKEN記入" authTokenSecret:@"AUTH TOKEN SECRET記入
" userName:@"ユーザーネーム" userID:@"ユーザーID"];
[[Twitter sharedInstance].sessionStore saveSession:session completion:^(id<TWTRAuthSession> session, NSError *error) {
NSLog(@"Session: %@", session);
NSLog(@"Error: %@", error);
}];
タイマーとバックグランド処理の備忘録
タイマーを使ってバックグランド処理を実行するために参考になったサイトです。
バックグランド処理は↓これそのまま使えます
定期タイマーはこれ↓単にタイマーを使うとUIも固まるのでこれを使用しました。
Mapcalloutの吹き出しを変更する
iOS Mapkitの吹き出し(callout)がiOS9から簡単になりました。
detailCalloutAccessoryViewに作成したViewを入れるでけで吹き出しが変更できます
さぁ試してみようと思いましたが幾つかはまったので備忘録
<はまった点>
①xibが作れない
はじめてxibからviewを作ったので下記のサイトを参考にしました。
↓サンプルコード
②サイズが変更できない
よしできたと思ったら今度はサイズが変更できない
なので下記サイトを参考にしました。
swiftでは↓こんな感じでできているようです。
どうもNSLayoutConstraintを使って拘束を与えてから入れれば良いようですが
objective-cなのでそのまま使えない。
NSLayoutConstraintの使用方法をここ↓から学びました。
やっとコールアウトが変更できました。
Finding Art Gallery privacy policy
This application for the purpose of providing a better service , collect usage information using Google Analytics. The collection and analysis, I am using Google Analytics. In Google Analytics to collect the log does not contain personally identifiable information and use cookies (cookie) . In addition , the log that is collected is managed based on Google 's privacy policy .
Methods and how to use collection of access information , have been determined by the Google Analytics Terms of Service and the Google Privacy Policy . For more information about Google Analytics, please refer to the following page : www.google.com/analytics