タグ

ブックマーク / nshipster.com (38)

  • UIAlertController

    Written by Mattt September 30th, 2014 This article has been translated into: 中文 Did you know that UIAlertView and UIActionSheet (as well as their respective delegate protocols) are deprecated in iOS 8? It’s true. ⌘-click on UIAlertView or UIActionSheet in your code, and check out the top-level comment: UIAlertView is deprecated. Use UIAlertController with a preferredStyle of UIAlertControllerStyle

    UIAlertController
    efcl
    efcl 2014/10/01
    UIAlert​Controllerについて
  • WKWebView

    Written by Mattt July 25th, 2018 (revised) This article has been translated into: 한국어 iOS has a complicated relationship with the web. And it goes back to the very inception of the platform over a decade ago. Although the design of the first iPhone seems like a foregone conclusion today, the iconic touchscreen device we know and love today was just one option on the table at the time. Early protot

    WKWebView
    efcl
    efcl 2014/08/26
    WKWebKit Frameworkについて。 UIWebViewのと比較、対応メソッドが載ってる。JavaScript bridge、console.logについてなど
  • XCTestCase /<br/>XCTestExpectation /<br/> measureBlock()

    Although iOS 8 and Swift has garnered the lion’s share of attention of the WWDC 2014 announcements, the additions and improvements to testing in Xcode 6 may end up making some of the most profound impact in the long-term. This week, we’ll take a look at XCTest, the testing framework built into Xcode, as well as the exciting new additions in Xcode 6: XCTestExpectation and performance tests. Most Xc

    XCTestCase /<br/>XCTestExpectation /<br/> measureBlock()
    efcl
    efcl 2014/07/22
    SwiftのXCTest、モックについて
  • Clang Diagnostics

    Written by Mattt June 16th, 2014 This article has been translated into: 中文 Diagnostics combine logic with analytics to arrive at a conclusion. It’s science and engineering at their purest. It’s human reasoning at its most potent. Within the medical profession, a diagnosis is made through instinct backed by lab samples. For industrial manufacturing, one diagnoses a product fault through an equal ap

    Clang Diagnostics
    efcl
    efcl 2014/06/21
    Clangのpragmaコメントアノテーションの一覧
  • iOS 8

    Written by Mattt June 9th, 2014 This article has been translated into: 中文 Ask anyone, and they’ll tell you: WWDC 2014 was one of the most exciting in recent memory. It was, first and foremost, a developer event, with nary a hardware announcement to upstage the latest software & developer tools. And boy howdy, was there a lot to be excited about. The announcements from iOS 8 & OS X Yosemite alone w

    iOS 8
    efcl
    efcl 2014/06/10
    iOSの新しいAPIについて。 ルビ、HealthKitのNSFormatterサブクラス、HKStatistics、文字の正規化?、WebKit、
  • CocoaPods

    Written by Mattt May 26th, 2014 This article has been translated into: 中文 Civilization is built on infrastructure: roads, bridges, canals, sewers, pipes, wires, fiber. When well thought-out and implemented, infrastructure is a multiplying force that drives growth and development. But when such formative structures are absent or ad hoc, it feels as if progress is made in spite of the situation. It

    CocoaPods
    efcl
    efcl 2014/05/27
    cocoapods基本的な使い方、pod trunk について
  • Benchmarking

    Written by Mattt May 19th, 2014 This article has been translated into: 中文 Abstractions are necessary for doing meaningful work, but they come at a cost. To work at a high level is to turn a blind eye to nonessential details in order to reason with larger logical chunks. Determining what information is important within a particular context, however, is challenging, and is at the heart of performanc

    Benchmarking
    efcl
    efcl 2014/05/20
    ベンチマークに使える時間計測の関数について
  • Xcode Plugins

    Apple is nothing if not consistent. From Pentalobular screws to Sandboxing, customers are simply expected to relinquish a fair amount of control when they choose to buy a Mac or iPhone. Whether these design decisions are made to ensure a good user experience, or this control is exercised as an end in itself is debatable, but the reality is that in both hardware and software, Apple prefers an ivory

    Xcode Plugins
    efcl
    efcl 2014/04/15
    Xcodeプラグイン紹介
  • UIApplicationDelegate launchOptions

    Written by Mattt December 16th, 2013 This article has been translated into: 中文 AppDelegate is the dumping ground for functionality in iOS. Application lifecycle management? URL routing? Notifications? Core Data incantations? Invasive and monolithic 3rd-party SDK initialization? Random functionality that doesn’t seem to fit anywhere else? Just stash it in AppDelegate.m! And of all of the crowded, o

    UIApplicationDelegate launchOptions
    efcl
    efcl 2013/12/17
    AppDelegateのUIApplication​Delegateについて
  • FileManager

    Written by Mattt October 29th, 2018 (revised) This article has been translated into: 中文 One of the most rewarding experiences you can have as a developer is to teach young people how to program. If you ever grow jaded by how fundamentally broken all software is, there’s nothing like watching a concept like recursion click for the first time to offset your world-weariness. My favorite way to introd

    FileManager
    efcl
    efcl 2013/11/19
    NSFileManagerについて
  • Reader Submissions -<br/> New Year's 2013

    Written by Mattt January 1st, 2013 This article has been translated into: 中文 In celebration of the forthcoming year++, I thought it’d be fun to compile a list of some of your favorite tips and tricks of the trade–to give y’all a chance to show off some of your NSHipster cred. Thanks to Cédric Luthi, Jason Kozemczak, Jeff Kelley, Joel Parsons, Maximilian Tagher, Rob Mayoff, Vadim Shpakovski, & @ale

    Reader Submissions -<br/> New Year's 2013
    efcl
    efcl 2013/11/14
    NS_INLINEを使って実行時間を図る関数. NSCacheの中身を見る方法
  • NSError

    Written by Mattt October 14th, 2013 This article has been translated into: 中文 To err is human. To NSError is Cocoa. All programs on a Unix system are a child process of another process, forking all the way from the original process, the unmoved mover: pid 1 (which in the case of OS X is launchd). When the executable finishes, it communicates a status code between 0 and 255 to its parent, as a way

    NSError
    efcl
    efcl 2013/10/14
    NSErrorとバリデーション、NSErrorのstatus codeのまとめ
  • Key-Value Observing

    Written by Mattt October 7th, 2013 This article has been translated into: 中文 Ask anyone who’s been around the NSBlock a few times: Key-Value Observing has the worst API in all of Cocoa. It’s awkward, verbose, and confusing. And worst of all, its terrible API belies one of the most compelling features of the framework. When dealing with complicated, stateful systems, dutiful book-keeping is essenti

    Key-Value Observing
    efcl
    efcl 2013/10/08
    KVOについて。 keyPathの一致はNSStringFromSelector(@selector())をつかって見ると文字列を使わなくてよい。
  • iOS 7

    Written by Mattt September 23rd, 2013 This article has been translated into: 中文 With the NDA finally lifted, we can finally talk about all of the amazing new APIs in iOS 7. And there are a lot of them. “1500 new APIs”, by Apple’s count during the WWDC Keynote. (Granted, a good portion of that could just be all of the changes from id to instancetype, but that’s a huge number, regardless). We’ll be

    iOS 7
    efcl
    efcl 2013/09/24
    iOS7で新しく入ったAPIについて。 Base64、NSURL、NSCalendarに日付比較、待望のfirstObject、2点の位置情報、SpeachAPI
  • AFNetworking 2.0

    Written by Mattt September 16th, 2013 This article has been translated into: 中文 AFNetworking is one of the most widely used open source projects for iOS and OS X development. It powers thousands of popular and critically acclaimed apps, and serves as the foundation for dozens of other great open source libraries and frameworks. With thousands of stars and forks, and hundreds of contributors, the p

    AFNetworking 2.0
    efcl
    efcl 2013/09/19
    AFNetworking 2.0の設計について。 iOS7でNSURLSessionのような通信のまとめるコンポーネントが入ったのでそれをベースに変わる
  • ValueTransformer

    Written by Mattt October 17th, 2018 (revised) This article has been translated into: 中文 Of all the Foundation classes, ValueTransformer is perhaps the one that fared the worst in the shift from macOS to iOS. Why? Here are two reasons: First, ValueTransformer was used primarily in AppKit with Cocoa bindings. There, they could automatically transform values from one property to another, like for neg

    ValueTransformer
    efcl
    efcl 2013/09/11
    NSValueTransformerについて. TransFormerのサブクラスを作って登録する方法
  • Network Link Conditioner - NSHipster

    Written by Mattt July 29th, 2019 (revised) This article has been translated into: 中文 Product design is about empathy. Knowing what a user wants, what they like, what they dislike, what causes them frustration, and learning to understand and embody those motivations — this is what it takes to make something insanely great. And so we invest in reaching beyond our own operational model of the world.

    Network Link Conditioner - NSHipster
    efcl
    efcl 2013/09/11
    通信速度を制限してテストする
  • Equality

    Written by Mattt August 15th, 2018 (revised) This article has been translated into: 中文 The concept of equality is a central topic in philosophy and mathematics, with far-reaching implications for matters of ethics, justice, and public policy. From an empiricist perspective of the universe, two objects are equal if they’re indistinguishable by measurable observation. On a human scale, egalitarians

    Equality
    efcl
    efcl 2013/08/27
    isEqual: hashについて
  • rand(3) / random(3) / arc4random(3) / et al.

    Written by Mattt August 12th, 2013 This article has been translated into: 中文 What passes for randomness is merely a hidden chain of causality. In a mechanical universe of material interactions expressed through mathematical equations, it is unclear whether nature encodes an element of chance, or if it’s a uniquely human way to reconcile uncertainty. We can be sure of one thing, however: in the clo

    rand(3) / random(3) / arc4random(3) / et al.
    efcl
    efcl 2013/08/20
    Objective-Cで使えるランダム関数について。 配列、文字、arc4randomを使うべき理由について
  • Swift Documentation

    Written by Nate Cook & Mattt July 11th, 2018 (revised) This article has been translated into: 中文 Code structure and organization is a matter of pride for developers. Clear and consistent code signifies clear and consistent thought. Even though the compiler lacks a discerning palate when it comes to naming, whitespace, or documentation, it makes all the difference for human collaborators. This week

    Swift Documentation
    efcl
    efcl 2013/08/08
    Objective-CのJavaDocのようなコメントアノテーションの書き方