quattro_4 scribble

scribble 落書き (調べた事をただ落書きする)

NSScreencast

NSScreencast Episode #89 Networking in iOS 7

Networking in iOS 7 - NSScreencast iTunes Affiliate Search APIから情報を取得して表示 iTunes Affiliate Search API http://itunes.apple.com/search?term=beatles&country=JP developer tool HTTP Client - Mac Developer Tool for HTTP Debugging term…

NSScreencast Episode #88 Interactive View Controller Transitions

Interactive View Controller Transitions - NSScreencast スクリーンが上から垂れ下がるようなエフェクトの戻すパターン @interface InteractiveSwipe : UIPercentDrivenInteractiveTransition @property (nonatomic, strong) UIPanGestureRecognizer *pan;…

NSScreencast Episode #87 Xcode 5 Autolayout Improvements

Xcode 5 Autolayout Improvements - NSScreencast iOS7のAutoLayout Ctrl + drag to superview Top/Bottom/Leading/Trailing space to Container Center Vertically/Horizontally in Container Dragした方向のものが表示される Orange constraints -> not fu…

NSScreencast Episode #86 iOS 7 View Controller Transitions

iOS 7 View Controller Transitions - NSScreencast スクリーンが上から垂れ下がるようなエフェクト UIViewControllerInteractiveTransitioning Protocol SwatchTransition transitionDuration animateTransition UIViewControllerTransitioningDelegate ani…

NSScreencast Episode #85 Hello, iOS 7

Hello, iOS 7 - NSScreencast Guide What's New in iOS: iOS 7.0 iOS 7 UI Transition Guide: Before You Start iOS7 status bar style faster screen animation slide right shift screen nav bar title fade in/out XCode5 capabilities Take a sneak peek…

NSScreencast Episode #84 xctool

xctool - NSScreencast Unit testをコマンドラインで走らせる $ xcodebuild ... TEST_HOST $(BUNDLE_LOADER) TEST_AFTER_BUILD=YES いろいろ面倒で問題あり xctool $ brew install xctool $ xctool -workspace LoginTester.xcworkspace \ -scheme LoginTeste…

NSScreencast Episode #83 TDD View Controllers Part 2

TDD View Controllers Part 2 - NSScreencast alert表示をmockしてテスト AlertViewProvider __block id _alertProvider; beforeEach(^{ _alertProvider = [OCMockObject mockForClass:[AlertViewProvider class]]; _vc.alertProvider = _alertProvider; [[_…

NSScreencast Episode #82 TDD View Controllers with Specta and OCMock

TDD View Controllers with Specta and OCMock - NSScreencast loginをmockしてテスト Specta Expecta EXP_SHORTHAND - If not defined, expectations must be written with EXP_expect instead of expect OCMock [UIStoryboard storyboardWithName:@"MainSt…

NSScreencast Episode #36 Searching in UITableView

Searching in UITableView - NSScreencast UISearchDisplayControllerで検索バーの実装 viewDidLoad setupSearchBar self.tableView.tableHeaderView = self.searchBar; UISearchDisplayController UISearchDisplayController Class Reference initWithSearc…

NSScreencast Episode #35 Autolayout Fun

Autolayout Fun - NSScreencast 3つのピザの画像のページをAuto layout Constraints Standard spacing recommended by apple Xcode No struts and spring (from iOS6) select target objects and right bottom on Xcode dropdown (horizontal spacing, ...) …

NSScreencast Episode #81 Associated Objects

Associated Objects - NSScreencast addTargetでbuttonTappedメソッドのようなものを書かない実装 addTarget:self @selector(buttonTapped:) : for argument @selector(setRandomColor) retain cycle (viewDidLoad) __weak ViewController *weakSelf = self;…

NSScreencast Episode #42 Retrying HTTP Requests

Retrying HTTP Requests - NSScreencast token取得のretry automatically detect expired authentication tokens [self secureValueForKey:AUTH_TOKEN_KEY]; if (operation.response.statusCode == 401) [self.credentialStore setAuthToken:nil]; refactori…

NSScreencast Episode #33 Core Graphics: Polygons

Core Graphics: Polygons - NSScreencast Sliderを動かして、正n角形を描画 PolygonView CGMutablePathRef path = CGPathCreateMutable(); CGPathCloseSubpath(path); CGContextAddPath(context, path); CGContextFillPath(context); self.numberOfSides set…

NSScreencast Episode #32 Core Graphics: Gradients

Core Graphics: Gradients - NSScreencast gradientのeffectを描画 Core Graphics pure c library drawRect helper class CGContextRef context = UIGraphicsGetCurrentContext(); drawLinearGradient CGColorSpaceRef colorSpace = CGColorSpaceCreateDevic…

NSScreencast Episode #80 PaintCode

PaintCode - NSScreencast PaintCodeというツール使い方 $99.99 クラウド(雲)のロゴ作成 エフェクトのあるロゴ作成 Core Graphics half pixel matter Add Image Add circle Transparent circle effect (like hole) stripe cmd + d - duplicate Paste code …

NSScreencast Episode #40 Shine Effect

Shine Effect - NSScreencast タイトルバーにShineエフェクトをつける shine logo on titlebar logo - black highlighted version - white mask - black titleView = logo view (UIImageView) CALayer CALayer *shineLayer = [CALayer layer]; shineLayer.co…

NSScreencast Episode #79 Sketch

Sketch - NSScreencast Sketch 2というイラストツールの使い方, iPhone画面のモックアップ $49.99 photoshop, illustrator option + drug - duplicate item mockup status bar nav bar overlay shadow nav button grouping items sketchmine SketchMine Sket…

NSScreencast Episode #78 TDD Money Part 2

TDD Money Part 2 - NSScreencast MoneyのTDD実装の続き multi currency exchange plus method Bank class reduce Sum class augend 《数学》被加数 addend 《数学》加数 exchange rate Expression.h (id)plus:(id)other; @class Money, Bank; #import はだ…

NSScreencast Episode #43 AVAudioPlayer

AVAudioPlayer - NSScreencast 自作のAudioプレーヤー AVFoundation framework #import <AVFoundation/AVFoundation.h> AVAudioPlayer [[AVAudioPlayer alloc] initWithContentsOfURL:[self localAudioFileURL] initWithData:error self.audioPlayer.volume = self.volumeSlider.value; if</avfoundation/avfoundation.h>…

NSScreencast Episode #45 Validating IAP Receipts

Validating IAP Receipts - NSScreencast iTunesのレシートを処理 (rails app x iOS app) iap_server rails app itunes-receipt gem Itunes::Receipt.verify! receipt_data, :allow_sandbox receipt_attributes itunes-receipt/lib/itunes/receipt.rb at mas…

NSScreencast Episode #44 In App Purchases

In App Purchases - NSScreencast アプリ内課金 iTunes connect iTunes Connect デベロッパガイド https://developer.apple.com/jp/devcenter/ios/library/documentation/iTunesConnect_Guide.pdf in app purchase consumable - currency non consumable - u…

NSScreencast Episode #77 TDD Money with Specta and Expecta

TDD Money with Specta and Expecta - NSScreencast Dollar, EuroなどMoneyのclassでTDD book Test Driven Devvelopment - Kent Beck testing framework kiwi specta (rspec like syntax) expecta (matchers) target "XxxTests" do pod specta pod expecta p…

NSScreencast Episode #46 Fun with UICollectionView

Fun with UICollectionView - NSScreencast いろいろな形、レイアウトでCollectionViewを表示 UICollectionView cellForItemAtIndexPath Custom collection view cell (subclass) @interface NumberCell : UICollectionViewCell initWithFrame viewDidLoad […

NSScreencast Episode #47 Gesture Recognizers

Gesture Recognizers - NSScreencast tapした場所に画像を表示させる、移動、拡大縮小、回転 common initWithTarget:self, action:@selector(onViewDoubleTap:) [self.view addGestureRecognizer:tapRecognizer]; UITapGestureRecognizer tapRecognizer.numb…

NSScreencast Episode #76 Extracting Data From Strings

Extracting Data From Strings - NSScreencast 文章から文字列を抽出する NSRegularExpression regularExpressionWithPattern:@"^Name:\s*?(.+)" options:NSRegularExpressionCaseInsensitive \w, \s enumerateMatchesInString usingBlock [input substringW…

NSScreencast Episode #75 A Tale of UIScrollView Customization

A Tale of UIScrollView Customization - NSScreencast 画面半分のTableViewが上下にスクロールする UIScrollView .frame.origin.y .frame.size.height self.tableView.tableHeaderView = self.filterView; UIScrollViewDelegate scrollViewDidScroll MAX(0,…

NSScreencast Episode #74 OAuth2

OAuth2 - NSScreencast InstagramでOAuth2使って画像を取得 OAuth1.0 cumbersome to implement client side implicit authentication response_type=token NSURL URLWithString [[UIApplication sharedApplication] openURL:url]; include token every reque…

NSScreencast Episode #55 Versioning

Versioning - NSScreencast バージョンの付け方、ツール Marketing version -> Version iTunesで見る番号 (1.0.1) Build version string short Build Info.plist (Build version) mainBundle infoDictionary CFBundleShortVersionString CFBundleVersion whe…

NSScreencast Episode #72 Objective-C Collections

Objective-C Collections - NSScreencast 主にNSSetの説明 NSSet, NSArray, NSOrderedSet, and NSDictionary NSArray [array enumerateObjectsUsingBlock:^(id obj, NSUInteger idx, BOOL *stop) { idx がある (*stop) = YES; で止める(break) (BOOL) contai…

NSScreencast Episode #73 SSL Pinning

SSL Pinning - NSScreencast self-sign a certificateを使う Charles HTTP proxy / HTTP monitor Proxy > Proxy Settings SSL tab, a self-signed certificate Proxy > Breakpoints edit response add crt file to project open ssl convert openssl x509 -i…