Ryusuke Fuda's Tech Blog

Softweare Enginier about Web, iOS, Android.

2014-02-01から1ヶ月間の記事一覧

iOS webview UIWebViewDelegate

ios

■ .h ファイル @interface DetailViewController : UIViewController <UIWebViewDelegate> @property (weak, nonatomic) IBOutlet UIWebView *webView; UIWebViewDelegateを追加 storyboardのwebviewから.hファイルへビヨーンと伸ばしてproperty設定■ .m ファイル - (void)viewD</uiwebviewdelegate>…

jQuery クリック $(this) 関連

■ クリックされた要素取得 $(this).attr('class'); //classすべて取得 $(this).attr('class').attr('class').split(' ')[0] //ひとつめのclass取得 ※attrで取得した値は単なるstringなので、jQueryの eq() は使えない。 splitでスペースを除いて配列にいれて…

Macのコマンドのディレクトリ表示を変更

mac

■ 長くなると画面の左側が埋まってしまうので、今いるディレクトリだけを表示 $export PS1="\W$ "参考) http://www.itmedia.co.jp/help/tips/linux/l0360.html

iOS URLエンコード

ios

参考) http://lab.dolice.net/blog/2013/03/24/objc-url-encode-decode/

iOS textfield return 閉じる

ios

参考) http://hirooka.pro/?p=369

iOS HTTP通信ファイル送信 POST PHP受信

ios

■ この通りにやると上手くサーバ側へ送れる http://yoshiminu.tumblr.com/post/56220528295/objective-c-post

iOS 録音 再生 実装

ios

■ ライブラリ追加 AVFoundation Framework ■ ヘッダーファイルにimportしインターフェイスへ定義 #import <AVFoundation/AVFoundation.h> @interface ViewController : UIViewController<AVAudioRecorderDelegate,AVAudioPlayerDelegate>{ AVAudioRecorder *avRecorder; AVAudioPlayer *avPlayer; } ■ あとはボタン実装して中にこの通りか</avaudiorecorderdelegate,avaudioplayerdelegate></avfoundation/avfoundation.h>…

UICollectionView

ios

参考) http://www.youtube.com/watch?v=jiiN9oFH3vE

iOS NSLog 基本コマンド

ios

//NSArray NSLog(@"itemArr: %@", itemArr); //int NSLog(@"number: %d",number);

iOS WiFi起動確認, ネットワーク接続確認実装

ios

■ iOSのライブラリ使うと簡単に圏外か3GかWiFiか確認できる。 http://obc-fight.blogspot.jp/2012/09/Reachability.html

UIImage Asset List アルバム作り保存

ios

参考) ■ Asset List関連 http://pentacreation.com/blog/2012/12/121207.html http://pentacreation.com/blog/2012/12/121212.html http://d.hatena.ne.jp/torasenriwohashiru/20110429/1304056248 http://ipgames.wordpress.com/tutorials/writeread-data-t…

UIImage document保存, 取得

ios

■ だいたいこんな感じでできる。 UIImage *tookImg = [info objectForKey:UIImagePickerControllerOriginalImage]; NSData *data = UIImageJPEGRepresentation(tookImg, 0.8f); // ここではデータを保存する為に一般的に使われるDocumentsディレクトリ NSStr…

iOS iOS7 3.5inch対応

■ iOS74インチ用のプログラムを3.5インチに対応させる参考) http://yuki0n0.blogspot.jp/2013/11/iphone4inch35inchstoryboard.html http://tama.hatenablog.jp/entry/2012/09/27/105054