タグ

programmingに関するbricklifeのブックマーク (342)

  • ARC対応と非対応の環境両方に対応するコードの書き方 - 強火で進め

    今、何かと話題なOpenUDIDのARC対応と非対応の環境両方に対応するコードが良かったのでメモ。 https://github.com/ylechelle/OpenUDID/blob/master/OpenUDID.h #if __has_feature(objc_arc) #define HAS_ARC 1 #define RETAIN(_o) (_o) #define RELEASE(_o) #define AUTORELEASE(_o) (_o) #else #define HAS_ARC 0 #define RETAIN(_o) [(_o) retain] #define RELEASE(_o) [(_o) release] #define AUTORELEASE(_o) [(_o) autorelease] #endif 念の為、この記入の前にこの辺りの記述を入れておいた方が良

    ARC対応と非対応の環境両方に対応するコードの書き方 - 強火で進め
    bricklife
    bricklife 2012/03/29
    コンパイル時に__has_feature(objc_arc)で条件分岐
  • ダウンロードした画像をキャッシュするクラスの設計と実装について - 24/7 twenty-four seven


    iOSNSCache - ninjinkun's diary @k_katsumi URL  URL  2012-03-26 16:42:44 via web to @k_katsumi @ninjinkun 便使 2012-03-26 16:45:05 via YoruFukurou to @ninjinkun @k_katsumi  2012-03-26 16:48:23 via web to
    bricklife
    bricklife 2012/03/28
    とても勉強になる実用的なサンプルコード
  • UITableViewCell 描画の高速化

    Mac OS X 用バイナリエディタ。 0xED ファイルの中身を詳細を見るのはもちろん、テキストの改行コードをちょっと確認したい時にも役立つ。PNGやJPEGなど画像ファイルのヘッダ情報を見るのにも重宝しそう。 PNGを開くとこんな感じ。 エディタなのでもちろん変...

    bricklife
    bricklife 2012/03/27
    「Twitterの中の人よる UITableViewCell描画の高速化 Tips」
  • iOS組み込みのキャッシュモジュールNSCacheについて発表しました - ninjinkun's diary


    NSCache43Cocoa西 NSCache  NSDictionary   iOS NSDictionary Mac OS 10.6 / iOS 4.0使 OSS(nimbusNIMemoryCache)OS使   TwitterInstagram
    iOS組み込みのキャッシュモジュールNSCacheについて発表しました - ninjinkun's diary
    bricklife
    bricklife 2012/03/26
    「スレッドセーフ」「NSDictionaryに似たインターフェイス」
  • Objective-C の __block の参照カウンタを調査中… - ganaware’s blog


    Objective-CBlockscopy__block__forwarding(?)寿copy 2011-11-24 17:58:17 via web -rewrite-objcC++objc? 2011-11-24 18:00:24 via web  @ganaware copyblock寿
    bricklife
    bricklife 2012/03/23
    libclosureだとflagsの最下位ビットがBLOCK_DEALLOCATINGになっていて、BLOCK_REFCOUNT_MASKが1ビット減ってる
  • 『iOS 4プログラミングブック』 第5章マルチスレッド 補遺 その3


    2011127!iOS 4 12__block  179BlocksLLVM http://clang.llvm.org/docs/BlockLanguageSpec.txt http://clang.llvm.org/docs/Block-ABI-Apple.txt ...   Block_copyBlock_releaseCLLVM
    bricklife
    bricklife 2012/03/23
    「BLOCK_REFCOUNT_MASK = 0xffff... 65536回Block_copyするとやばそうですね!」
  • IDEA * IDEA

    ドットインストール代表のライフハックブログ

    IDEA * IDEA
    bricklife
    bricklife 2012/03/22
    株式会社ドットインストール! 田口さんの本気
  • monkey coders' - Xcode Debugging Tips

    ここは管理人pigeon6と同じようなコンピュータとプログラムとアレゲが好きなおさるさんのためのサイトです。たぶん。 Xcode環境でデバッグを行う際に役に立ちそうな情報をまとめました。 Xcodeはgdbフロントエンドとして動作するビジュアルデバッガを提供していますが、VisualStudioなどを使い慣れていると、ぱっと見足りない機能があるように見えるというか、「あれ、コレってどうやるの?」みたいな事が、いくつかあります。 このページでは、そんな経験を何度かした私が関連ドキュメントの一部を調べて、これはと思った機能を紹介します。そんなわけで、Xcodeのデバッガの使い方がそもそも分からないというような初心者には適さない内容ではありますが、何となく使っているだけでは分からない、あるいは見落としやすい内容をメインに書いています。 なお、Guard Malloc(libgmalloc)につ

  • My App Crashed, Now What?

    App crashes are a natural part of the development cycle. The challenge is to understand the real reason behind the crash and apply the proper fix, not just hide the crash. In this tutorial, you’ll look at some crash examples, investigate them, understand why they happened and, finally, fix them once and for all. Before you get started, it’s valuable to know some details about Swift so you understa

    My App Crashed, Now What?
    bricklife
    bricklife 2012/03/19
    Xcodeとlldbを駆使してアプリケーションのクラッシュを解決するチュートリアル
  • Customizing the iOS Keyboard

    Our applications need input and the default iOS keyboards are often not optimally suited to providing the sort of data we want. When we find that we really wish the keyboard had some extra controls or want to help our users enter a specific set of symbols it is time to customize our apps’ keyboards. What controls the keyboard anyway? Our first exposure to different keyboard types probably comes fr

    Customizing the iOS Keyboard
  • iOS 5専用のメソッドをiOS 4でも使えるようにするもうちょっといい方法 - bricklifeのはてなブログ


    presentingViewController - Objective-C - bricklifeiOS 5 UIViewController  presentingViewController iOS 4使 使Objective-C使 NSObject  resolveInstanceMethod: 使 resolveInstanceMethod: resolveInstanceMethod: 
    iOS 5専用のメソッドをiOS 4でも使えるようにするもうちょっといい方法 - bricklifeのはてなブログ
    bricklife
    bricklife 2012/03/19
    resolveInstanceMethod: を使った動的メソッド追加とカテゴリによるメソッドオーバーライドについて
  • Xcode4 用カスタムテンプレートの作り方

    @natsun_happy さんによる ARC解説シリーズ。今回は Outletの話。 [iOS5] ARC : Outletにはweakプロパティを使おう - iOS 開発ブログ Natsu's note ざっくりまとめるとポイントは2点 通常 UIB...

    bricklife
    bricklife 2012/03/19
    シングルトンのテンプレートで dispatch_once が使われている。なるほどー
  • iOS 5.1 対応のあれこれ | Technologic


    © Apple Inc. 8 iOS5.1 OS使   iOS5.1  iOS5  OTA Over-the-Air mac  iOS5.0 5-10 Factory Unlocked iPhone  
    bricklife
    bricklife 2012/03/19
    キーボード系通知はなんでこうコロコロ変わるんだろうか…。リンク先も合わせて読むべし
  • http://hmdt.jp/blog/?p=508

    bricklife
    bricklife 2012/03/19
    ユニバーサルアプリならではの問題
  • niw.at — だいぶ実装がアレな SkypeLogger の解説


    Mac OS X  Objective-C   SkypeLogger  SkypeLogger  SkypeLogger Skype Skype.app 1便 Skype API 使  Skype API API 
    bricklife
    bricklife 2012/03/14
    SIMBL+Objective-C+Ruby
  • プチコンmkII発売 - takuya matsubara blog


    14mkII   2 http://smileboom.com/special/ptcm2/  mkII 1  (v1.2) mkII(v2.0) gcirclemkII spofs27 QR
    プチコンmkII発売 - takuya matsubara blog
    bricklife
    bricklife 2012/03/14
    ついにQRコード機能搭載! これは買うしかない…
  • UIScrollView Tutorial: Getting Started

    UIScrollView is one of the most versatile and useful controls in iOS. It’s the basis for the very popular UITableView and it’s a great way to present content that’s larger than a single screen. In this UIScrollView tutorial, you’ll create an app similar to the default iOS Photos app and learn all about UIScrollView. You’ll learn how to: Use UIScrollView to zoom and view a very large image. Keep UI

    UIScrollView Tutorial: Getting Started
  • bsnesがついに完成したそうだ


    byuu's homepage SNES Coprocessors  The Future Has Arrived via: Bsnes has emulated every SNES DSP | Hacker News bsnesbsnes1995 2使ST018 
    bricklife
    bricklife 2012/03/08
    すごい熱意と技術 「スーパーファミコンを極限まで正確にエミュレートする目的で開発」
  • スタティックライブラリにカテゴリを含めると無駄に容量が増える件

    bricklife
    bricklife 2012/03/07
    -all_loadに要注意
  • iOSコーディングスタイルを変えてしまうBlocksKitの紹介 - 中継地点


    iOS4BlockDelegate performedSelector使NSDictionaryInvocation使 CoreFoundationBlockBlocksKit便 BlocksKit https://github.com/zwaldowski/BlocksKit BlocksKitBSD, MIT
    iOSコーディングスタイルを変えてしまうBlocksKitの紹介 - 中継地点
    bricklife
    bricklife 2012/03/06
    なんだこれ、便利すぎる