2017-11-01から1ヶ月間の記事一覧
[問題文] Find longest sequence of zeros in binary representation of an integer. [考えたアルゴリズム] 配列A,B,Cを用意する 与えられた数値Nを二進数に変換する 変換した数値を文字として扱い、1文字ずつ区切り配列Aに追加する For Loop(文字列"0"と"1"…
var binaryNumStr = String(N,radix: 2)
AlamofireImageとは github.com AlamofireImage is an image component library for Alamofire. 1.CocoaPods source 'https://github.com/CocoaPods/Specs.git' platform :ios, '10.0' use_frameworks! target '<Your Target Name>' do pod 'AlamofireImage', '~> 3.3' end 2.P</your>…
ユーザープロフィールなどで正円を作りたいとき UIImageViewのサブクラスを作る 作成したクラス内で以下のコードを書く override func layoutSubviews() { super.layoutSubviews() layer.cornerRadius = self.frame.width / 2 }