Code School - videos (ruby, git, ios)
Videos
- Ruby Tapas: Naming Things
- メソッド名の付け方が大事と言う話
- RubyTapasの宣伝みたい
- Git Hooks
- 公式ドキュメントをなぞっている感じ
- post commitでpushしている、大胆
- iOS Categories ★★
- UITextFieldにバリデーションを追加
- 空白チェック
- Eメールフォーマットチェック
- Add methods without subclassing
- Naming conventions
- NSArray+FirstObject
- @interface NSArray (FirstObject)
- Project tree > Right click > New file > Objective-c category > category, category on
- if field iskindOfClass UITextfield class
- field text length > 1 -> fieldIsNotEmpty
- NSRegularExpression regularExpressionWithPattern
- numberOfMatches > 0
- submitFields sender
- if UITextField fieldIsNotEmpty
- pros and cons
- pros
- Need to add a method to a build-in class
- Need to add a method to all instances of a class
- Group methods by functions to make it easier to read and maintain classes
- cons
- Can't add properties or instance variables
- possible to accidentally modify a category methods later
- pros
- Tips
- Prefix (jf_fieldIsNotEmpty)
- PCH (Pre-compiled header)
- #ifdef __OBJC__
- UITextFieldにバリデーションを追加