“Segues initiated directly from view controllers must have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]”というエラーが発生しました。
segueのIdentiferが設定されていなかったことが原因でした。
Read the rest of this post
iOSやAndroid開発でのエラー解決法や便利tipsのメモ
“Segues initiated directly from view controllers must have an identifier for use with -[UIViewController performSegueWithIdentifier:sender:]”というエラーが発生しました。
segueのIdentiferが設定されていなかったことが原因でした。
Read the rest of this post
実機でアプリを起動させようとしたら”Timed out waiting for app to launch.”というエラーが発生しました。
ProvisioningがDistribution用になっており、Build Configurationもreleaseになったままでした。
Developer用のProvisioningを指定してBuild Configurationをdebugに変更したら無事起動できました。
arc4random()で生成される乱数には偏りがあるそうです。
通常、以下の式のように除算の余りを使って乱数を取得しますが、この仕組みに偏りの原因があります。
1 2 |
//0から9の乱数を取得 int randomNumber = arc4random()%10; |
Objectiv-Cでシングルトンクラスを作成するときの作法を調べてみました。
Read the rest of this post
“failed to get the task for process 3689″というエラーが出て実機でアプリが起動できませんでした。
code signingがDistribution Provisioningになっていたことが原因でした。
Developer用のProvisioningに指定し直したら解決しました。
Interface Builderで作ったオブジェクト(IBOutlet修飾子をつけてproperty宣言したオブジェクト)の所有修飾子は何を指定するのが正しいのでしょうか。
retainそれともassign(ARC使用の場合はstrong or weak/unsafe_unretained)?
ソースコードによって違っていて気になったので調べてみました。
Read the rest of this post
お絵かきアプリを作成するためにいろいろとサンプルを漁ってみたので、そのなかで参考になったものを紹介します。
Read the rest of this post
ミュージックプレイヤーのShake to Shuffleのようにユーザーのシェイクジェスチャーを検知して何かの動作をさせたい場合はmotionBeganまたはmotionEndedメソッドを使います。
Read the rest of this post
“<Error>: FT_Open_Face failed: error 85″というエラーが発生しました。
Info.plistのなかのKey:Fonts provided by applicationに空欄のアイテムがあることが原因のようです。
これを削除したら解決しました。
Read the rest of this post
MSMutableStringの使い方について説明します。
Read the rest of this post