CGAffineTransformあたりを使うと回転、拡大、縮小、平行移動などの操作を行うことができます。仕様、ポイントなどをメモしておきます。 CGAffineTransformの基本 アフィン変換自体はC言語の構造体として定義されています。その中身は3行3列の行列ですが、普段はあまり意識する必要はなさそうです。 UIImageViewのインスタンスとしてmyViewがあるとき、2倍に拡大する方法 CGAffineTransform trans; trans = CGAffineTransformMakeScale( 2, 2); // x,y2倍に拡大 myView.transform=trans; 拡大し、さらに90度回転 CGAffineTransform trans; trans = CGAffineTransformMakeScale( 2, 2); trans = CGAff
インストール GitHubからプロジェクトをダウンロードし、その中から下記のファイルを自分のプロジェクトへコピーして追加する。 LKBadgeView.m LKBadgeView.h 使い方 UIView のサブクラスなので生成してビューへ貼り付けるだけで使える。 (コード例) LKBadgeView* badgeView = [[[LKBadgeView alloc] initWithFrame:CGRectMake(100, 200, 50, 20)] autorelease]; [self.view addSubview:badgeView]; badgeView.text = @"23"; XIB に配置してそれを使ってもいい。サンプルアプリではこの方法を使っている。 @property (nonatomic, retain) IBOutlet LKBadgeView* badge
'12/11/24: このブログの内容をもとに Amazon Kindle ストアで電子書籍を出版しました。 スマートフォンアプリ配信の輸出管理 作者: 村上卓弥出版社/メーカー: 村上 卓弥発売日: 2012/11/23メディア: Kindle版この商品を含むブログを見る その3までで終わるつもりだったのですが、せっかくなので米国商務省BISに暗号登録までやってみました。 参考にしたのはこちらのブログです → Apple iTunes export restrictions on apps やってみたら思いのほか簡単に ERN 取得できたので、やり方を書いてみようと思います。 登録するアプリについて 登録するアプリは、今開発中のこれです。 どこで暗号を使っているかというと、Twitter でツイートするところです。認証部分のところですね。このアプリは iOS5 専用で作っていて、Twit
'12/11/24: このブログの内容をもとに Amazon Kindle ストアで電子書籍を出版しました。 スマートフォンアプリ配信の輸出管理 作者: 村上卓弥出版社/メーカー: 村上 卓弥発売日: 2012/11/23メディア: Kindle版 クリック: 1回この商品を含むブログ (2件) を見る 前回のエントリで、EAR の Category 5, Part 2 に該当するかどうかの判定まで書きました。今回は、該当する場合に、さらに暗号の分類をする方法について書いてみます。分類によっては無許可で輸出できるケースがあります。 どこを見るかですが、今度は登録の「私は、暗号登録なしに、私の暗号品目を自己番号分類し、それを輸出することができますか?」 の中にあるフローチャート2をみて分類していきます。(原文はこちら) なお、以下の説明で Q. の番号は説明のために私が勝手に振ってます (前
'12/11/24: このブログの内容をもとに Amazon Kindle ストアで電子書籍を出版しました。 スマートフォンアプリ配信の輸出管理 作者: 村上卓弥出版社/メーカー: 村上 卓弥発売日: 2012/11/23メディア: Kindle版 クリック: 1回この商品を含むブログ (2件) を見る 今回は、暗号を使用しているアプリが、EAR で実際に規制されるかどうかについて書いてみます。 ※ 最初に断っておきますが、私は法律の専門家ではないので、間違いとかが入っている可能性がなくはないです。ですので、この記事を信用して損害を被ったとしても保証はいたしかねます。また、間違いがあれば指摘してくださいね。前回の記事がはてなブックマークの人気エントリ入りして内心ひやひやしてます。 Category 5, Part 2 で規制されるかの確認 暗号品目は、EAR の規制品目 (CCL, Com
'12/11/24: このブログの内容をもとに Amazon Kindle ストアで電子書籍を出版しました。 スマートフォンアプリ配信の輸出管理 作者: 村上卓弥出版社/メーカー: 村上 卓弥発売日: 2012/11/23メディア: Kindle版 クリック: 1回この商品を含むブログ (2件) を見る AppStore でアプリ配信をしようとして iTunes Connect にアプリをアップロードしようとすると、「暗号使ってるかい?」(Export Complianceのところ)という質問がされますよね?皆さん、あそこちゃんと答えてますか? ほとんどのサイトは No でいいよ、と書いてあります。が、これは間違い。アプリが暗号関連でなくても、アプリ内に暗号コードが入ってなくても、iOS の暗号を使っている場合はここは Yes と答えないといけません。 具体的には、HTTPS を使ってる場
This is the second part of a two part tutorial series where we’ll build a cool catapult type game from scratch using Cocos2D and Box2D! In the first part of the series, we added the catapult into the scene, with the ability to shoot dangerous acorns. In this second and final part of the series, we’re going to flesh this out into a complete game, and add targets to shoot at and game logic. If you d
In this tutorial series we’ll build a cool catapult type game from scratch using Cocos2D and Box2D! We’ll use the art created by Ray’s lovely and talented wife Vicki to create a game about catapults, acorns, dogs, cats, and angry squirrels. In this tutorial series, you’ll learn: How to use rotation joints How to use weld joints How to have the camera follow a projectile How to use a collision’s im
Xcode4が軽くなったので感動を共有します。 (以下、自己責任で) Xcode4が重い。最初から軽くはなかったけど、さらに重くなってきた感じです。 プロジェクトファイルのパッケージを開いてproject.xcworkspaceを削除するといいらしいというPostを見つけたので試してみました。 https://twitter.com/#!/hotmiyacchi/status/89881185458733056 project.xcworkspaceの中にUserInterfaceState.xcuserstateというXMLがありました。見たらサイズが8.1MB。 消してみた: project.xcworkspaceを(バックアップをとって)削除したら、アホみたいに軽くなりました。カーソルもちゃんと動くし、補完も実用的な速さ。 再生成されたUserInterfaceState.xcuse
AppleがiOS 5の新ベータをリリースしたのだが、変更点に「UDID(Unique Device Identifier、デバイス固有ID)の廃止」含まれていたことが判明、各所で話題になっている(CNET Japan、Washington Post、WirelessWire)。 これに対する、Twitterでの日本の一部の開発者の反応が「UDIDに依存する人々とたしなめる人々にてまとめられているのだが、UDIDがなくなると困る、という人が多い模様。UDIDの代わりにアプリケーション側で固有のIDを作成して利用することは十分に可能なのだが、その場合その固有IDは作成したアプリケーションでしか利用できないため、不満をもつ人が多いようだ。しかし、UDIDはユーザーによる変更が不可能である不変IDであるため、非常に強力な個人トラッキング能力を持つ。さらに、アプリケーションを問わず認証が可能である
iOS/iPhone/iPad/MacOSX プログラミング, Objective-C, Cocoaなど UITableView を下にドラッグした時に画面上部の矢印が下向き↓からクルッと回転して上向き↑になるアニメーションが起こる。これを iPhoneで実行してみるとカクっとひっかかるような感じがあった。コードはこんな感じ。 [UIView animateWithDuration:0.2 animations:^{ self.imageView.transform = CGAffineTransformMakeRotation(endAngle); }];Blocks によるアニメーションを使っている。 beginAnimations 先日この件で Kyasu さんより情報提供があった。 kyasu says: 2011年8月18日19:43 >プルダウンしてアニメーションが起きる時に若
iOS/iPhone/iPad/MacOSX プログラミング, Objective-C, Cocoaなど 通知(Notification)を配信(POST)するメソッドのテストコードを考える。 ポイントは次の2つ (1) 意図したタイミングで通知が配信されたかどうか (2) 配信された通知は意図したものだったか たとえば addEntryWithInfo:tagName: というメソッドを呼び出すと LKQueueDidAddEntryNotification という通知が送られることをテストする場合を書いてみる。 テスト対象のメソッドの実装イメージはこんな感じ。 - (LKQueueEntry*)addEntryWithInfo:tagName: { : [[NSNotificationCenter defaultCenter] postNotificationName:LKQueueD
최신 아이폰 휴대폰 소식을 제공합니다.
Core Data has many features, one of which is the Transient attribute. This type of attribute on a Core Data entity is part of a data model, but is not persisted in your Core Data persistent store. If you open up the raw SQLite store file and peek at the schema, you will not find any transient attributes. These transient attributes are still handy despite no data being persisted to the data store.
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く