검색 사이트 Linkios 폰트 이름을 검색할 수 있는 사이트
12345678910func getAssetThumbnail(asset: PHAsset) -> UIImage { let manager = PHImageManager.defaultManager() let option = PHImageRequestOptions() var thumbnail = UIImage() option.synchronous = true manager.requestImageForAsset(asset, targetSize: CGSize(width: 100.0, height: 100.0), contentMode: .AspectFit, options: option, resultHandler: {(result, info)->Void in thumbnail = result! }) return thu..
1234567891011121314151617181920@IBOutlet weak var testView: UIView! override func viewDidLoad() { super.viewDidLoad() // Do any additional setup after loading the view, typically from a nib. self.animationStart() } func animationStart(){ //Transform 다중 적용 var t = CGAffineTransformIdentity t = CGAffineTransformTranslate(t, CGFloat(100), CGFloat(300)) t = CGAffineTransformRotate(t, CGFloat(M_PI_4)..
info.plist에 NSLocationWhenInUseUsageDescription또는NSLocationAlwaysUsageDescription추가GPS정보를 어플리케이션 사용중에만 사용한다면 NSLocationWhenInUseUsageDescription 에 안내 메세지를 입력한다.GPS정보를 어플리케이션 항상 사용한다면 NSLocationAlwaysUsageDescription 에 안내 메세지를 입력한다. 12345678910111213141516171819202122232425262728import UIKitimport CoreLocation class ViewController: UIViewController, CLLocationManagerDelegate { var locationManager..
123456789let today = NSDate() //현재 시각 구하기let dateFormatter = NSDateFormatter()dateFormatter.dateFormat = "yyyy년 M월 d일"var dateString = dateFormatter.stringFromDate(today)print(dateString) //"2016년 2월 21일" dateFormatter.dateFormat = "yyyy-MM-dd"dateString = dateFormatter.stringFromDate(today)print(dateString) //"2016-02-21"cs
123456789101112131415161718192021222324import UIKit class DetailViewController: UIViewController { override func viewDidLoad() { super.viewDidLoad() self.setNavigationBar() //네비바 셋팅 // Do any additional setup after loading the view. } override func didReceiveMemoryWarning() { super.didReceiveMemoryWarning() // Dispose of any resources that can be recreated. } func setNavigationBar(){ let bar:UIN..
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950import UIKit class ViewController: UIViewController ,UITextViewDelegate{ var contentField: UITextView? let gap:CGFloat = 8 //TextView 와 view 사이 gap override func viewDidLoad() { super.viewDidLoad() NSNotificationCenter.defaultCenter().addObserver(self, selector: "keyboardWillShow:", name: UIKeyboardWillSho..
1234567891011121314151617181920212223242526272829import UIKit class WritePostViewController: UIViewController ,UITextFieldDelegate ,UITextViewDelegate{ @IBOutlet weak var titleField: UITextField! @IBOutlet weak var contentField: UITextView! override func viewDidLoad() { super.viewDidLoad() self.titleField.delegate = self self.contentField.delegate = self } override func viewDidAppear(animated: B..
info.plist 에서 "View controller-based status bar appearance” 를 "NO"로 바꾼다. 모든 화면의 상태바의 색상을 변경하려면 AppDelegate파일에서 1234func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool { UIApplication.sharedApplication().statusBarStyle = .LightContent }Colored by Color Scriptercs 특정 View 에서만 색상을 변경하려면 해당 ViewController파일에서 12345override func vi..
- Total
- Today
- Yesterday