城市選取器,效果 源碼https://github.com/YouXianMing/Animations//// CustomCityPickerViewController.m// Animations//// Created by YouXianMing on 2017/9/12.// Copyright 2017年 YouXianMing. All rights reserved.//#import "CustomCityPickerViewController.h"#
drawRect中消除鋸齒,drawRect消除鋸齒在開始之前,我們需要建立一個DrawRectView 其初始代碼為//// DrawRectView.h// CGContextSetShouldAntialias//// Created by YouXianMing on 2017/8/30.// Copyright 2017年 TechCode. All rights reserved.//#import <UIKit/UIKit.h>@interface
【代碼筆記】iOS-獲得現在的時間(2015-09-11),ios-2015-09-11一,代碼。- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //2015-09-16格式 NSDate *date = [NSDate new]; NSDateFormatter
【代碼筆記】iOS-在Block中修改外部變數值的,ios-block一,代碼。- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. // 第一種是可以修改 static 全域變數;第二種是可以修改用新關鍵字 __block 修飾的變數。 __block int
【代碼筆記】iOS-在導覽列中顯示等待對話方塊,ios-導覽列一,。二,代碼。ViewController.m#import "ViewController.h"@interface ViewController ()@end@implementation ViewController- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view,
【代碼筆記】iOS-長條label,ios-長條label一,。二,代碼。ViewController.m- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //提示label UILabel *alertLabel=[[UILabel
【代碼筆記】iOS-長條藍色button,ios-長條藍色button一,。二,代碼。ViewController.m- (void)viewDidLoad { [super viewDidLoad]; // Do any additional setup after loading the view, typically from a nib. //添加裝置 UIButton *deviceButton=[UIButton buttonWithType: