Mobile developmentDevelop mobile apps or web apps for any kind of mobile deviceMobile development means developing applications — mobile apps or web apps — for any kind of mobile device that runs some kind of mobile operating system.
i added a custom protocol to one of my classes and i am getting a compiler warning when i attempt to set the delegate during a prepareForSegue: method. the warning i get is... Sending 'MyCustomViewControllerClass *const __strong' to parameter of incompatible type 'id<NSFileManagerDelegate>' the project builds and runs and everything works fine minus the warning. if i add <NSFileManagerDelegate> to
You cannot add a subview to UIImageView in interface builder for reasons only known to Apple! You are right in saying that you can addSubview programmatically, but then, the overhead of setting autoresizing masks and placements of subviews should all be handled in code, which is cumbersome. So there is an easy workaround. Instead of dragging an instance of UIImageView in the nib, just drag a UIVie
ARC (Automatic Reference Counting) を有効にすると、従来のソースコードを大幅に修正する必要がでてくるため、それまでに作成していたプログラムをまるごと ARC に移行するのは、なかなか困難な場合もあると思います。 この ARC を使うかどうかの設定ですが、ARC を有効にする で記したプロジェクト単位での設定の他にも、ファイル単位でも設定できるようになっていました。 ファイル単位で ARC の有効化または無効化は、プロジェクトの "TARGET" の設定で行います。 プロジェクトの "TARGET" を選択したら、そこの "Build Phases" から "Compile Sources" を選択します。 ここで、ARC の有効化や無効化を個別に設定したいソースファイルをダブルクリックして、コンパイラーオプションとして、次の値を設定します。
Objective-C と Swift とでは、それぞれで定義したクラスを簡単に相互利用できるようになっています。 ここでは Objective-C で定義したクラスを Swift で利用する方法を紹介します。Swift で定義したクラスを Objective-C で利用する方法については Swift で定義したクラスを Objective-C で利用する で紹介します。 Objective-C のクラスを Swift で利用できるようにするための準備 ブリッジヘッダーファイルを用意する Objective-C のクラスを Swift から利用できるようにするためには、どの Objective-C クラスを Swift で利用するかを記載したブリッジヘッダーファイルをプロジェクト内に用意する必要があります。 このブリッジヘッダーファイルは一般的に "$(TARGET_NAME)-Bridg
たとえば下記のように、delegate プロトコルと、それをプロパティに持つクラスを定義し、 @protocol HogeManagerDelegate <NSObject> @end @interface HogeManager : NSObject @property (nonatomic, weak) id<HogeManagerDelegate> delegate; @end HogeViewController で下記のように `setDelegate:` するとします。 [[HogeManager sharedManager] setDelegate:self]; で、これを Xcode 6 でビルドすると、 warning: sending 'HogeViewController *const __strong' to parameter of incompatible ty
iOS Advent Calender 2013 iOS second stage一日目担当の@keroxpです。普段は大学の研究室でインターフェースの研究をしていたり、仕事先の会社でiOSアプリの開発を行っていたりします。 さて、今回私が取り上げるテーマは「Xcodeと自動化」です。予告のタイトルでは「XcodeとContinuous Integration」だったのですが、CIを含めた自動化という題材でお送りしたいと思います。 自動化の意義 iOSに限らず、ソフトウェア開発の日常には様々なイライラが存在します。一つ一つは小さく、手間も少ないように思える事柄でも、手動でやらなくてはいけないことがひとつふたつ...と増えていったり、開発期間が長引くにつれて毎日毎日一定時間同じ作業を手動で行わなくてはならなくなります。 Don't Repeat Yourself!! そこでこの記事ではXco
iOS Advent Calendar 2011 22日目 この記事は@glassonion1さん主催のiOS Advent Calendar2011に向けて書いています。 昨日の@yomoappさんのiOS向けのオープンソースをまとめたサイトを作りましたからのバトンタッチです。 最近4.2以前のXCodeで開発したアプリをARC対応させたので、その手順と注意点など書いていきたいと思います。 ARCって何ですか ARCとはAutomatic Reference Countingの略称で、XCode4.2のApple LLVM 3.0 コンパイラから搭載された新機能です。 ご存知、iOSのObjective-CにはGCが無い為、オブジェクトのライフタイム管理はretain/releaseによるリファレンスカウンタの増減によって制御していました。 ARCはこれまで自分で記述しなければならなかっ
Mountain Lion発表とともにリリースされたXcode4.4。OSX Lionでも使える様になっています。Xcode4.4から、llvm (コンパイラ)のバージョンが4.0になっています。 それによってObjective-Cの書き方にかなりの改善が加えられたので、それを簡単にまとめておきたいと思います。これらの改善は、iOS6に関係なく動作するので、いま作っている、iOS5用のコードにも使用出来ます。 synthesize by default コンパイラが@synthesizeを補完してくれる様になったため、基本的な状況では、@synthesizeを書かなくてよくなりました。また、synthesizeされる相手のivarも、同名の変数ではなくて、アンダーバーを最初に付けた物がデフォルトとなります。これまで議論されて来たことがappleのコンパイラによって、これからは定義されている
iPhoneアプリから自己証明書の https サーバーに接続しようと思った場合、どうするのがいいでしょう。 普通に Objective-C の NSURLConnection を使用すると証明書の検証エラーになってしまいます。少し検索すると非公開APIを使用して回避する方法もあるようです。(NSURLConnection +setAllowsAnyHTTPSCertificate:forHost) Cocoa アプリだとこの方法で良いかもしれません。しかし iPhone では審査ではじかれること請け合いです。と言うかはじかれました。 そこで libcurl をつかって C の世界で HTTP 接続をしてしまえばリジェクトしようがないだろうということでやってみたときの記録です。 前提 以後の作業はすべて iPhone SDK をインストールした OSX 上で行っています。 openssl
Debugging tips for Objective-C programmingThis post is about getting extra information from your program at runtime. Xcode and gdb both support a wide range of information access tools — but you need to know that they're there. Here are some Objective-C specific gdb tips and commands that all Cocoa programmers should know. Please note: this article is part of the older Objective-C era on Coc
line to the implementation. This isn't very much work but it's still menial and boring stuff. Also, even though it's simple, it is one of the most commonly performed tasks in Objective-C 2.0 programming, since every class will likely have multiple properties that will need to be created and configured in a similar fashion. Instead of creating these two lines of code in the two different files, I w
PLCrashReporter Stewardship Moving to Microsoft September 12, 2019, by Chris Campbell We're very pleased to announce that the App Center team at Microsoft will be taking on stewardship of PLCrashReporter, the popular open source crash reporting framework made by Plausible Labs Cooperative. PLCrashReporter was created by (Plausible co-founder and alumnus) Landon Fuller way back in 2008, and it was
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く