iOS 年月日時(shí)間區(qū)間選擇器

1次氨、創(chuàng)建一個(gè)集成PickerView的View

.h文件

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@protocol LYDateIntervalSelectorPickerDelegate <NSObject>

-(void)dateWithSelect:(NSDate *)date;

@end

@interface LYDateIntervalSelectorPicker : UIPickerView<UIPickerViewDelegate, UIPickerViewDataSource>

-(instancetype)initWithDatePickerView;

@property (nonatomic, assign) id<LYDateIntervalSelectorPickerDelegate> pvDelegate;

@property (nonatomic, strong, readonly) NSDate *date;

@end

NS_ASSUME_NONNULL_END

.m文件

#import "LYDateIntervalSelectorPicker.h"

static CGFloat rowsHeight = 44.0;

@interface LYDateIntervalSelectorPicker ()

@property (nonatomic, strong) NSIndexPath *todayIndexPath;
@property (nonatomic, strong) NSArray *months;
@property (nonatomic, strong) NSArray *years;
@property (nonatomic, strong) NSArray *days;
@property (nonatomic, strong) NSCalendar *calendar;

@end

@implementation LYDateIntervalSelectorPicker

-(instancetype)initWithDatePickerView{
    
    self = [super init];
    if (self) {
        
        self.delegate = self;
        self.dataSource = self;
        
        self.years = [self nameOfYears];
        self.months = [self nameOfMonths];
        self.days = [self nameOfDays];
        self.todayIndexPath = [self todayPath];
        [self selectCurrentDate];
        
    }
    return self;
    
}

- (void)selectCurrentDate{
    
    NSIndexPath *selectIndexPath = [self todayPath];
    
    //設(shè)置當(dāng)前年份
    [self selectRow:selectIndexPath.section
        inComponent:0
           animated:YES];
    [self pickerView:self didSelectRow:selectIndexPath.row inComponent:0];
    
    selectIndexPath = [self todayPath];
    
    //設(shè)置當(dāng)前月份
    [self selectRow:selectIndexPath.row
        inComponent:1
           animated:YES];
    [self pickerView:self didSelectRow:selectIndexPath.row inComponent:1];
    
    //設(shè)置當(dāng)前日期
    CGFloat day = [[[self currentDayName] substringToIndex:[self currentDayName].length] floatValue] - 1;
    [self selectRow:day inComponent:2 animated:YES];
    [self pickerView:self didSelectRow:day inComponent:2];
    
}

- (void)pickerView:(UIPickerView *)pickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component{
    
    //獲取當(dāng)前選中的是幾號(hào)
    NSInteger currert = [pickerView selectedRowInComponent:2] + 1;
    
    //判斷二月份最大天數(shù)和30號(hào)和31號(hào)
    if (currert > [self daysCountWithSelectDate]) {
        [pickerView selectRow:[self daysCountWithSelectDate] inComponent:2 animated:NO];
    }
    
    if (component == 0 || component == 1) {
        self.days = [self nameOfDays];
        [pickerView reloadComponent:1];
        [pickerView reloadComponent:2];
    }
    
    if ([self.pvDelegate respondsToSelector:@selector(dateWithSelect:)]) {
        [self.pvDelegate dateWithSelect:[self date]];
    }
    
}

-(NSDate *)date{

    NSString *year = [self.years objectAtIndex:([self selectedRowInComponent:0])];
    NSString *month = [self.months objectAtIndex:([self selectedRowInComponent:1])];
    NSString *day = [self.days objectAtIndex:([self selectedRowInComponent:2]) % self.days.count];

    NSDateFormatter *formatter = [NSDateFormatter new];
    [formatter setDateFormat:@"yyyy年M月d日"];
    NSString *dateString = [NSString stringWithFormat:@"%@%@%@", year, month, day];
    NSDate *date = [formatter dateFromString:dateString];
    return date;

}

#pragma mark - UIPickerViewDelegate

-(CGFloat)pickerView:(UIPickerView *)pickerView widthForComponent:(NSInteger)component{
    return [self componentWidth];
}

-(UIView *)pickerView:(UIPickerView *)pickerView viewForRow:(NSInteger)row forComponent:(NSInteger)component reusingView:(UIView *)view{

    UILabel *returnView = [self labelForComponent:component];
    returnView.text = [self titleForRow:row forComponent:component];
    return returnView;
    
}

-(CGFloat)pickerView:(UIPickerView *)pickerView rowHeightForComponent:(NSInteger)component{
    return rowsHeight;
}

#pragma mark - UIPickerViewDataSource
- (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)pickerView{
    return 3;
}

-(NSInteger)pickerView:(UIPickerView *)pickerView numberOfRowsInComponent:(NSInteger)component{
    
    if(component == 0){
        return self.years.count;
    }else if (component == 1) {
        return self.months.count;
    }else {
        return self.days.count;
    }
    
}

-(CGFloat)componentWidth{
    return self.bounds.size.width / 3;
}

-(NSString *)titleForRow:(NSInteger)row forComponent:(NSInteger)component{
    
    if(component == 0) {
        return [self.years objectAtIndex:(row)];
    }else if(component == 1) {
        return [self.months objectAtIndex:(row)];
    }else {
        NSInteger DayCount = self.days.count;
        return [self.days objectAtIndex:(row % DayCount)];
    }
    
}

-(UILabel *)labelForComponent:(NSInteger)component{
    
    CGRect frame = CGRectMake(0, 0, [self componentWidth], rowsHeight);
    UILabel *label = [[UILabel alloc] initWithFrame:frame];
    label.textAlignment = NSTextAlignmentCenter;
    label.backgroundColor = [UIColor clearColor];
    label.userInteractionEnabled = NO;
    return label;
    
}



#pragma mark --------- 華麗的分割線 ---------



//當(dāng)前時(shí)間
-(NSIndexPath *)todayPath{
    
    CGFloat row = 0.f;
    CGFloat section = 0.f;
    
    NSString *year  = [self currentYearName];
    NSString *month = [self currentMonthName];
    
    for(NSString *cellYear in self.years) {
        
        if([cellYear isEqualToString:year]) {
            section = [self.years indexOfObject:cellYear];
            break;
        }
        
    }
    
    for(NSString *cellMonth in self.months) {
        
        if([cellMonth isEqualToString:month]) {
            row = [self.months indexOfObject:cellMonth];
            break;
        }
        
    }
    
    return [NSIndexPath indexPathForRow:row inSection:section];
    
}

//年份數(shù)組
-(NSArray *)nameOfYears{
    
    NSMutableArray *years = [NSMutableArray array];
    NSInteger currentYear = [[[self currentYearName] substringToIndex:4] integerValue];
    
    for(NSInteger year = currentYear - 5; year <= currentYear; year++) {
        NSString *yearStr = [NSString stringWithFormat:@"%li年", (long)year];
        [years addObject:yearStr];
    }
    return years;
    
}

//月份數(shù)組
-(NSArray *)nameOfMonths{
    return @[@"1月", @"2月", @"3月", @"4月", @"5月", @"6月", @"7月", @"8月", @"9月", @"10月", @"11月", @"12月"];
}

//日期數(shù)組
-(NSArray *)nameOfDays{
    
    NSUInteger numberOfDaysInMonth = [self daysCountWithSelectDate];
    NSMutableArray *tempArr = [NSMutableArray array];
    for (int i = 1; i < numberOfDaysInMonth + 1 ; i ++) {
        NSString *day = [NSString stringWithFormat:@"%d日",i];
        [tempArr addObject:day];
    }
    return tempArr;
    
}

//根據(jù)當(dāng)前年月獲取當(dāng)前月天數(shù)
-(NSInteger)daysCountWithSelectDate{
    self.calendar = [NSCalendar currentCalendar];
    NSRange range = [self.calendar rangeOfUnit:NSCalendarUnitDay
                                        inUnit:NSCalendarUnitMonth
                                       forDate:[self monthDate]];
    return range.length;
}

//根據(jù)當(dāng)前年月返回日期
-(NSDate *)monthDate{
    
    NSString *year = [self.years objectAtIndex:([self selectedRowInComponent:0])];
    NSString *month = [self.months objectAtIndex:([self selectedRowInComponent:1])];
    NSDateFormatter *formatter = [NSDateFormatter new];
    [formatter setDateFormat:@"yyyy年M月"];
    NSDate *date = [formatter dateFromString:[NSString stringWithFormat:@"%@%@", year, month]];
    return date;
    
}

//當(dāng)前年份
-(NSString *)currentYearName{
    
    NSDateFormatter *formatter = [NSDateFormatter new];
    [formatter setDateFormat:@"yyyy年"];
    return [formatter stringFromDate:[NSDate date]];
    
}

//當(dāng)前月份
-(NSString *)currentMonthName{
    
    NSDateFormatter *formatter = [NSDateFormatter new];
    NSLocale *usLocale = [[NSLocale alloc] initWithLocaleIdentifier:@"zh_CN"];
    [formatter setLocale:usLocale];
    [formatter setDateFormat:@"M月"];
    return [formatter stringFromDate:[NSDate date]];
    
}

//當(dāng)前日期
-(NSString *)currentDayName{
    
    NSDateFormatter *formatter = [NSDateFormatter new];
    [formatter setDateFormat:@"d日"];
    return [formatter stringFromDate:[NSDate date]];
    
}

@end

2拗踢、創(chuàng)建一個(gè)View

.h文件

#import <UIKit/UIKit.h>
#import "LYDateIntervalSelectorPicker.h"

NS_ASSUME_NONNULL_BEGIN

@interface LYDateIntervalSelectorView : UIView

//單例
+(LYDateIntervalSelectorView *)initClient;

-(void)datePickerCompleteBlock:(void (^)(NSDate *startDate, NSDate *endDate))completeBlock;

@end

NS_ASSUME_NONNULL_END

.m文件 — 引入頭文件
#import "LYDateIntervalSelectorPicker.h"

#import "LYDateIntervalSelectorView.h"
#import "LYDateIntervalSelectorPicker.h"

static CGFloat whiteViewHeight = 400.f;
static CGFloat pickerHeight = 250.f;

//時(shí)間回調(diào)
typedef void (^ DateBlock)(NSDate *, NSDate *);

@interface LYDateIntervalSelectorView ()<LYDateIntervalSelectorPickerDelegate>
{
    CGFloat height;
    CGFloat width;
}

//白色背景
@property (nonatomic, strong) UIView *whiteView;

@property (nonatomic, copy) DateBlock dateBlock;

//開始時(shí)間
@property (nonatomic, strong) UIButton *bStart;
//結(jié)束時(shí)間
@property (nonatomic, strong) UIButton *bEnd;

//開始時(shí)間date
@property (nonatomic, strong) NSDate *startDate;
//結(jié)束時(shí)間date
@property (nonatomic, strong) NSDate *endDate;

//選擇器
@property (nonatomic, strong) LYDateIntervalSelectorPicker *selectorPicker;

//區(qū)分當(dāng)前操作時(shí)間——開始時(shí)間或結(jié)束時(shí)間
@property (nonatomic) BOOL timeType;

@end

@implementation LYDateIntervalSelectorView

+(LYDateIntervalSelectorView *)initClient{
    
    static LYDateIntervalSelectorView *client = nil;
    static dispatch_once_t onceToken;
    dispatch_once(&onceToken, ^{
        client = [[self alloc] initWithFrame:[UIScreen mainScreen].bounds];
        [client createUI];
    });
    return client;
    
}

-(void)datePickerCompleteBlock:(void (^)(NSDate *startDate, NSDate *endDate))completeBlock{
    
    _dateBlock = completeBlock;
    [self show];
    
}

#pragma mark - 創(chuàng)建布局
-(void)createUI{
    
    height = [UIScreen mainScreen].bounds.size.height;
    width = [UIScreen mainScreen].bounds.size.width;
    
    //默認(rèn)時(shí)間
    self.endDate = [NSDate date];
    self.startDate = [NSDate date];
    
    //取消手勢
    UITapGestureRecognizer *cancelTap = [[UITapGestureRecognizer alloc]initWithTarget:self action:@selector(tapCancelAction)];
    [self addGestureRecognizer:cancelTap];
    
    //白色背景
    self.whiteView = [[UIView alloc]initWithFrame:CGRectMake(0, height, width, whiteViewHeight)];
    self.whiteView.backgroundColor = [UIColor whiteColor];
    [self addSubview:self.whiteView];
    
    //完成
    UIButton *bConfirm = [[UIButton alloc]initWithFrame:CGRectMake(0, 0, width, 40)];
    [bConfirm setTitle:@"完成" forState:0];
    [bConfirm setTitleColor:[UIColor cyanColor] forState:0];
    [bConfirm addTarget:self action:@selector(buttonConfirm) forControlEvents:UIControlEventTouchUpInside];
    [self.whiteView addSubview:bConfirm];
    
    CGFloat edge = 20.f;
    CGFloat labelWidth = (width - edge * 5) / 2;
    
    //開始時(shí)間
    _bStart = [[UIButton alloc]initWithFrame:CGRectMake(20, CGRectGetMaxY(bConfirm.frame) + edge * 2, labelWidth, 40)];
    [_bStart setTitle:[self dateFormatWithDate:[NSDate date]] forState:0];
    [_bStart setTitleColor:[UIColor cyanColor] forState:0];
    _bStart.tag = 1000;
    [_bStart addTarget:self action:@selector(buttonTypeTimeSelect:) forControlEvents:UIControlEventTouchUpInside];
    [self.whiteView addSubview:_bStart];
    UIImageView *ivLineStart = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMinX(_bStart.frame), CGRectGetMaxY(_bStart.frame), CGRectGetWidth(_bStart.frame), 1)];
    ivLineStart.backgroundColor = [UIColor lightGrayColor];
    [self.whiteView addSubview:ivLineStart];
    
    //至
    UILabel *lFromTo = [[UILabel alloc]initWithFrame:CGRectMake(CGRectGetMaxX(_bStart.frame) + edge, CGRectGetMinY(_bStart.frame), edge, CGRectGetHeight(_bStart.frame))];
    lFromTo.text = @"至";
    lFromTo.textColor = [UIColor blackColor];
    lFromTo.textAlignment = NSTextAlignmentCenter;
    lFromTo.font = [UIFont systemFontOfSize:16];
    [self.whiteView addSubview:lFromTo];
    
    //結(jié)束時(shí)間
    _bEnd = [[UIButton alloc]initWithFrame:CGRectMake(CGRectGetMaxX(lFromTo.frame) + edge, CGRectGetMinY(_bStart.frame), CGRectGetWidth(_bStart.frame), CGRectGetHeight(_bStart.frame))];
    [_bEnd setTitle:[self dateFormatWithDate:[NSDate date]] forState:0];
    [_bEnd setTitleColor:[UIColor lightGrayColor] forState:0];
    _bEnd.tag = 1001;
    [_bEnd addTarget:self action:@selector(buttonTypeTimeSelect:) forControlEvents:UIControlEventTouchUpInside];
    [self.whiteView addSubview:_bEnd];
    UIImageView *ivLineEnd = [[UIImageView alloc]initWithFrame:CGRectMake(CGRectGetMinX(_bEnd.frame), CGRectGetMaxY(_bEnd.frame), CGRectGetWidth(ivLineStart.frame), CGRectGetHeight(ivLineStart.frame))];
    ivLineEnd.backgroundColor = [UIColor lightGrayColor];
    [self.whiteView addSubview:ivLineEnd];
    
    //選擇器
    self.selectorPicker = [[LYDateIntervalSelectorPicker alloc]initWithDatePickerView];
    self.selectorPicker.frame = CGRectMake(0, whiteViewHeight - pickerHeight, width, pickerHeight);
    self.selectorPicker.pvDelegate = self;
    [self.whiteView addSubview:self.selectorPicker];
    
    
}

-(void)buttonTypeTimeSelect:(UIButton *)sender{
    
    if (sender.tag - 1000 == 0) {
        [_bStart setTitleColor:[UIColor cyanColor] forState:0];
        [_bEnd setTitleColor:[UIColor lightGrayColor] forState:0];
        self.timeType = NO;
    }else{
        [_bStart setTitleColor:[UIColor lightGrayColor] forState:0];
        [_bEnd setTitleColor:[UIColor cyanColor] forState:0];
        self.timeType = YES;
    }
    
}

-(void)dateWithSelect:(NSDate *)date{
    
    //時(shí)間轉(zhuǎn)時(shí)間戳
    NSString *time = [self dateFormatWithDate:date];
    
    //選擇結(jié)束時(shí)間
    if (self.timeType) {
        self.endDate = date;
        [_bEnd setTitle:time forState:0];
    }
    
    //選擇開始時(shí)間
    else{
        self.startDate = date;
        [_bStart setTitle:time forState:0];
    }
    
}

-(void)buttonConfirm{
    
    //開始時(shí)間的時(shí)間戳
    NSInteger sDate = [self timestampWithDate:self.startDate];
    //結(jié)束時(shí)間的時(shí)間戳
    NSInteger eDate = [self timestampWithDate:self.endDate];
    
    //開始時(shí)間的時(shí)間戳大于結(jié)束時(shí)間的時(shí)間戳是不對(duì)的料睛,直接return掰伸,提示時(shí)間不對(duì)
    if (sDate > eDate) {
        NSLog(@"時(shí)間不對(duì)");
        return;
    }
    
    if (_dateBlock) {
        _dateBlock(self.startDate,self.endDate);
    }
    
}

//顯示手勢
-(void)show{
    
    [[UIApplication sharedApplication].keyWindow addSubview:self];
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
    [UIView animateWithDuration:0.25 animations:^{
        self.whiteView.frame = CGRectMake(0, self->height - whiteViewHeight, self->width, whiteViewHeight);
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.4];
    }];
    
}

//取消手勢
-(void)tapCancelAction{
    
    [UIView animateWithDuration:0.2 animations:^{
        self.whiteView.frame = CGRectMake(0, self->height, self->width, whiteViewHeight);
        self.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0];
    } completion:^(BOOL finished) {
        [self removeFromSuperview];
    }];
    
}

//時(shí)間格式
-(NSString *)dateFormatWithDate:(NSDate *)date{
    
    NSString *formatStr = @"yyyy-MM-dd";
    NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
    [dateFormatter setDateFormat:formatStr];
    return [dateFormatter stringFromDate:date];
    
}

//時(shí)間轉(zhuǎn)時(shí)間戳
-(NSInteger)timestampWithDate:(NSDate *)date{
    return [date timeIntervalSince1970] / 1000;
}

@end

3充边、創(chuàng)建一個(gè)Controller

.h文件

#import <UIKit/UIKit.h>

NS_ASSUME_NONNULL_BEGIN

@interface DateSelectorController : UIViewController

@end

NS_ASSUME_NONNULL_END

.m文件 —— 引入頭文件
#import "LYDateIntervalSelectorView.h"

#import "DateSelectorController.h"
#import "LYDateIntervalSelectorView.h"

@interface DateSelectorController ()

@end

@implementation DateSelectorController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
    self.view.backgroundColor = [UIColor whiteColor];
    
    [[LYDateIntervalSelectorView initClient] datePickerCompleteBlock:^(NSDate * _Nonnull startDate, NSDate * _Nonnull endDate) {
        
        NSString *formatStr = @"yyyy年MM月dd日";
        NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
        [dateFormatter setDateFormat:formatStr];
        NSLog(@"ss  %@",[dateFormatter stringFromDate:startDate]);
        NSLog(@"ee  %@",[dateFormatter stringFromDate:endDate]);
        
    }];
    
}

@end

4唁毒、效果圖

效果圖.gif

5苟径、全劇終

我也是服了有些人了案站,Demo

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個(gè)濱河市棘街,隨后出現(xiàn)的幾起案子蟆盐,更是在濱河造成了極大的恐慌,老刑警劉巖遭殉,帶你破解...
    沈念sama閱讀 217,657評(píng)論 6 505
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件石挂,死亡現(xiàn)場離奇詭異,居然都是意外死亡险污,警方通過查閱死者的電腦和手機(jī)痹愚,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,889評(píng)論 3 394
  • 文/潘曉璐 我一進(jìn)店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來蛔糯,“玉大人拯腮,你說我怎么就攤上這事∫响” “怎么了动壤?”我有些...
    開封第一講書人閱讀 164,057評(píng)論 0 354
  • 文/不壞的土叔 我叫張陵,是天一觀的道長淮逻。 經(jīng)常有香客問我琼懊,道長阁簸,這世上最難降的妖魔是什么? 我笑而不...
    開封第一講書人閱讀 58,509評(píng)論 1 293
  • 正文 為了忘掉前任哼丈,我火速辦了婚禮启妹,結(jié)果婚禮上,老公的妹妹穿的比我還像新娘醉旦。我一直安慰自己饶米,他們只是感情好,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,562評(píng)論 6 392
  • 文/花漫 我一把揭開白布车胡。 她就那樣靜靜地躺著咙崎,像睡著了一般。 火紅的嫁衣襯著肌膚如雪吨拍。 梳的紋絲不亂的頭發(fā)上,一...
    開封第一講書人閱讀 51,443評(píng)論 1 302
  • 那天网杆,我揣著相機(jī)與錄音羹饰,去河邊找鬼。 笑死碳却,一個(gè)胖子當(dāng)著我的面吹牛队秩,可吹牛的內(nèi)容都是我干的。 我是一名探鬼主播昼浦,決...
    沈念sama閱讀 40,251評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開眼馍资,長吁一口氣:“原來是場噩夢(mèng)啊……” “哼!你這毒婦竟也來了关噪?” 一聲冷哼從身側(cè)響起鸟蟹,我...
    開封第一講書人閱讀 39,129評(píng)論 0 276
  • 序言:老撾萬榮一對(duì)情侶失蹤,失蹤者是張志新(化名)和其女友劉穎使兔,沒想到半個(gè)月后建钥,有當(dāng)?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,561評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡虐沥,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,779評(píng)論 3 335
  • 正文 我和宋清朗相戀三年熊经,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片欲险。...
    茶點(diǎn)故事閱讀 39,902評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡镐依,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出天试,到底是詐尸還是另有隱情槐壳,我是刑警寧澤,帶...
    沈念sama閱讀 35,621評(píng)論 5 345
  • 正文 年R本政府宣布秋秤,位于F島的核電站宏粤,受9級(jí)特大地震影響脚翘,放射性物質(zhì)發(fā)生泄漏。R本人自食惡果不足惜绍哎,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,220評(píng)論 3 328
  • 文/蒙蒙 一来农、第九天 我趴在偏房一處隱蔽的房頂上張望。 院中可真熱鬧崇堰,春花似錦沃于、人聲如沸。這莊子的主人今日做“春日...
    開封第一講書人閱讀 31,838評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽。三九已至特幔,卻和暖如春咨演,著一層夾襖步出監(jiān)牢的瞬間,已是汗流浹背蚯斯。 一陣腳步聲響...
    開封第一講書人閱讀 32,971評(píng)論 1 269
  • 我被黑心中介騙來泰國打工薄风, 沒想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留,地道東北人拍嵌。 一個(gè)月前我還...
    沈念sama閱讀 48,025評(píng)論 2 370
  • 正文 我出身青樓遭赂,卻偏偏與公主長得像,于是被迫代替她去往敵國和親横辆。 傳聞我的和親對(duì)象是個(gè)殘疾皇子撇他,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,843評(píng)論 2 354

推薦閱讀更多精彩內(nèi)容

  • Swift1> Swift和OC的區(qū)別1.1> Swift沒有地址/指針的概念1.2> 泛型1.3> 類型嚴(yán)謹(jǐn) 對(duì)...
    cosWriter閱讀 11,101評(píng)論 1 32
  • 1、創(chuàng)建一個(gè)集成PickerView的View .h文件 .m文件 2狈蚤、創(chuàng)建一個(gè)View .h文件 .m文件 —...
    鄧布利多教授閱讀 2,230評(píng)論 0 2
  • 廢話不多說困肩,直接上干貨 ---------------------------------------------...
    小小趙紙農(nóng)閱讀 3,357評(píng)論 0 15
  • 01. 寬心。 人活著炫惩,沒必要凡事都爭個(gè)明白僻弹。水至清則無魚,人至清則無朋他嚷。跟家人爭蹋绽,爭贏了,親情...
    一向珂帥閱讀 244評(píng)論 0 0
  • ?? 筆者使用的sublime3的版本為最新的3126蚣抗,win10的版本為win10專業(yè)版64位(10.0,版本1...
    磨劍者閱讀 1,275評(píng)論 1 0