うちのいぬ Tech Blog

Tech Blog of Uchinoinu/My dog

2016-09-01から1ヶ月間の記事一覧

Sending HTTP Request with Custon header like "AccessToken" by Almofire, and Getting them by Rails 4.x

GET with Custom Header by Alamofire let URL = NSURL(string: "https://dinner.please")! let mutableURLRequest = NSMutableURLRequest(URL: URL) let message = "I want to eat!" mutableURLRequest.HTTPMethod = "GET" mutableURLRequest.setValue(mess…

AlamofireでRequest Headerに AccessTokenなどを設定してGETで通信して、Rails4.x でそれらを受け取る

忘れていたので、復習の意味でメモ。 AlamofireでCustom HeadersでGET let URL = NSURL(string: "https://onedari.please")! let mutableURLRequest = NSMutableURLRequest(URL: URL) let message = "tabetai" mutableURLRequest.HTTPMethod = "GET" mutable…

How to use URL including dot (decimal point) in Rails 4.x

What I want to do GET http://domain.jp/api/2.1.1/users or GET http://domain.jp/meats/score/21293.02 (You may say URL with parameter including dot is not good....) How I failed config/routes.rb get 'meats/score/:score' => 'meats#score' rout…

Rails4.x で 少数点(. ドット)を含めたURLを使いたい場合

やりたいこと GET http://domain.jp/api/2.1.1/users とか GET http://domain.jp/meats/score/21293.02 とか、少数点、というかドットが入った形のURLを使う方法についてです。 (そもそもドットの入った値はURLに入れないほうが良いのかもしれませんが...)…

Schemeを共有する

環境 Xcode 7.3.1 Git 2.7.4 MacOS 10.11.5 Github 共有の仕方 ここをタップ 次にここをタップ こんな画面が出るので、sharedのとろこに、共有したいschemeはチェックを入れる そしたらGitで差分がでるので、それをcommitしてpush

Share Schemes

Env Xcode 7.3.1 Git 2.7.4 MacOS 10.11.5 Github How Tap here Next Tap Here You can see screen below, then check-in the checkbox of scheme you want to share Then you can find diff in Git, commit and push it

Back Button of NavBar Tapped when Incrementally Searching using SearchBarNavigationBar, search function cannot act correctly

Environment Xcode 7.3.1 iOS 8+ Situation Implement Incremental Search in TableViewController using SearchBar Input search word Leave by back button of nav bar, not x button or cancel button Search cannot move correctly. Initial View of Sea…

SearchBarでのインクリメンタルサーチ時にNavigationBarのBack Buttonで戻って再度検索をすると正常に動かない件

環境 Xcode 7.3.1 iOS 8+ 状況 SearchBarを使ってTableViewControllerで、インクリメンタルサーチを実装 検索ワードを入力 xボタンやcancelボタンではなく、戻るボタンで離脱 再度検索をしようとしたら、正常に動かなかった 検索画面の初期状況 検索バーにFi…

Calling and configuring UISearchController in viewWillAppear to implement Search View, SearchBar layout became bad

Environment Xcode 7.3.1 iOS 8,9 What's happened? Collapsed layout of SearchBar Search View Input text in SearchBar Search Result Search Target Data can be divided to some layer, so use section and side index list to show them in TableView …

検索機能を実装する際に、UISearchControllerをviewWillAppearで呼んだら、ダメな感じになった

環境 Xcode 7.3.1 iOS 8,9 何が起きたか 検索バーのレイアウトが崩れる 検索画面 検索バーにテキスト入力 検索結果 検索対象のデータが幾つかの階層に分けられるので、sectionで分けたり、サイドにsectionに応じたindexを表示させたりしています。 検索結果…

How to fix error "Could not insert new outlet connection and deleting DerivedData doesnt work"

Environment Xcode 7.3 Situation Using Storyboard, when I tried to connect IBOutlet, error "Could not insert new outlet connection and deleting DerivedData doesnt work" was shown And set automatic in Assistant Editor, No Result was shown, a…

エラー "Could not insert new outlet connection and deleting DerivedData doesnt work" への対処

環境 Xcode 7.3 状況 Storyboardで、該当のコードに対してIBOutletを結ぼうとしたら、"Could not insert new outlet connection and deleting DerivedData doesnt work" というエラーがでた そもそもAssistant Editorでautomaticにしたとき、No Resultとなり…