IBM Developer is your one-stop location for getting hands-on training and learning in-demand skills on relevant technologies such as generative AI, data science, AI, and open source.
通信系ライブラリ AFNetworking https://github.com/AFNetworking/AFNetworking ド定番中の定番のライブラリ!! レスポンスデータの処理やエラーハンドリングがブロック構文で書けるので通信周りを実装するときは必ずこれを使っています。 Alamofire これも定番中の定番の通信のライブラリ! Swiftで記述されているのでBriging-Headerを準備する必要なし! 個人的にはまだAFNetworkingのほうが使いやすいですがこれから使っていくつもりです GoldRaccon FTP通信を実装する際はこれを使っています。 クライアントからサーバーへのアップロードまたサーバーからのダウンロード処理を簡単に記述することができます。 SDWebImage UIImageViewに表示する画像(UIImage)をサーバーから取得&表示するライ
初めまして!エウレカでiOSエンジニアをしているジョンと申します。 カップル専用アプリCouplesの開発チームのメンバーです。 今回は、iOSエンジニアとして開発には慣れてきたけど、もう1段ステップアップしたい!という方のために、厳選した5つのTipsを紹介いたします。 それでは早速いってみましょう。 1. 他言語向けの日付フォーマット 日付を表示するなら、NSDateFormatterが一般的です。例えば、今年のバレンタインデーの日付をUILabelに設定する場合、 NSDateFormatter *formatter = [NSDateFormatter new]; formatter.dateFormat = @"M/d(EEE)"; self.textLabel.text = [formatter stringFromDate:valentinesDate]; 通常はこれで全く問
NSViewController は Mac OS X 10.5 から導入されたクラスで名前の通りビューを対象としたコントローラ。テーブルビューのカスタマイズを調査する過程で気になったので少し調べてみた。 Mac Dev Center: NSViewController Class Reference NSViewController リファレンスから説明を転載する。 Memory management of top-level objects similar to that of the NSWindowController class, taking the same care to prevent reference cycles when controls are bound to the nib file's owner that NSWindowController began
Objective-Cで乱数を発生させたい時があります。その方法の比較。 rand()を使う 一番単純な方法としてはrand()を使います。rand()で乱数を発生させ、MAX_NUMのmodをとることでMAX_NUM未満の乱数を取得するわけです。 rand() % MAX_NUM; 例)rand() % 3 + 1 →1から3までの乱数を取得 ただし、この方法で実装すると実行するたびに毎回同じ乱数が発生します。そのため、乱数の初期値を修正する下記の方法をとることが多いです。 srand(time(NULL));//現在の秒数を元に初期値を修正 rand() % MAX_NUM arc4random()を使う Objective-Cでは便利な関数としてarc4random()があります。これを使うと乱数の初期化が要りません。 ((int) arc4random()) % MAX_NUM;
I have a NSTextField and I want to set its content if I klick on a button and than set the cursor on this textfield at the end of the text so if someone klicks the button he could just begin to type. Until now I use [NSTextField selectText] it selects this textfield but it selects the whole text so if someone just begins to type he'd lose all the text which alread is in the textfield.
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
SW engineering, engineering management and the business of software Some optional backstory: The relevant documentation is: Transitioning to ARC Release Notes Mike Ash also has a ARC great writeup in one of his Friday Q&As. The deep technical documentation lives at the CLANG site of the LLVM project. The advice here assumes you are using iOS 5 or greater, not 4. In practice, weak pointers are such
Below you’ll find a collection of Objective-C macros, a reader submission (thank you): // Device Info #define UA_isIPad (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) #define UA_isIPhone (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) #define UA_isRetinaDevice ([[UIScreen mainScreen] respondsToSelector:@selector(scale)] && [[UIScreen mainScreen] scale] >= 2) #define U
Objective-C でなんとなく知っているけど実はよく知らないプロパティ(@property)まわりの 基本的な仕様をまとめました。 Xcode6.1が正式リリースされてSwiftのβがとれたし、「Swift使うからいらないよ」なんて言わないで、iOS開発のお供にどうぞ。 プロパティ(@property)って何? メンバ変数(インスタンス変数)を外部から参照、代入するためのアクセサ(getter/setter)です。 メッセージ([]カッコで囲むアレ)で独自のgetter/setterを実装、使用してもいいですが、 プロパティを使う事で foo.name = @”John”; のような他言語でも馴染みのあるドット区切りで参照・代入ができるようになります。 例: // クラスヘッダファイル(Foo.h) @interface Foo : NSObject @property (nonat
リリース、障害情報などのサービスのお知らせ
最新の人気エントリーの配信
処理を実行中です
j次のブックマーク
k前のブックマーク
lあとで読む
eコメント一覧を開く
oページを開く