一個(gè)星形評(píng)分控件的封裝

前言

很久沒(méi)有更新簡(jiǎn)書了系冗,這段時(shí)間一直在忙著擼代碼。項(xiàng)目的事情暫時(shí)總算是告一段落了薪鹦,打開(kāi)簡(jiǎn)書一看掌敬,整個(gè)六月份一篇都沒(méi)有寫。本來(lái)還想強(qiáng)行解釋一波的池磁,算了奔害,總結(jié)一句話,還是懶地熄。新項(xiàng)目設(shè)計(jì)妹紙正在做設(shè)計(jì)稿华临,看到項(xiàng)目中有一個(gè)星形評(píng)分的控件,閑來(lái)無(wú)事端考,找了幾個(gè)網(wǎng)上的看了一下雅潭,都不是很滿足自己的需求,所以自己動(dòng)手實(shí)現(xiàn)了一下却特。

效果圖

效果圖.gif

實(shí)現(xiàn)思路

  • 創(chuàng)建前后兩個(gè)frame相等的視圖
  • 在創(chuàng)建好的視圖上循環(huán)添加需要個(gè)數(shù)的UIImageView扶供,并設(shè)置對(duì)應(yīng)的圖片。
  • 根據(jù)手指在控件上的位置獲取X軸上的偏移量核偿,計(jì)算成分?jǐn)?shù)诚欠。

代碼實(shí)現(xiàn)

大致的實(shí)現(xiàn)思路了解了,接下來(lái)要做的就是編碼實(shí)現(xiàn)漾岳。首先創(chuàng)建一個(gè)類 XKStarRateView 繼承自 UIView轰绵,在 XKStarRateView.h 中,聲明一些初始的構(gòu)造方法尼荆。

#import <UIKit/UIKit.h>

typedef NS_ENUM(NSInteger, XKStarRateStyle) {
    
    XKWholeStarStyle = 0,
    
    XKHalfStarStyle = 1,
    
    XKIncompleteStarStyle = 2
};

typedef void(^XKStarRateSelectedBlock)(CGFloat score);

@class XKStarRateView;

@protocol XKStarRateViewDelegate <NSObject>

- (void)starRateView:(XKStarRateView *)starRateView currentScore:(CGFloat)currentScore;

@end


@interface XKStarRateView : UIView

/// 是否顯示動(dòng)畫(默認(rèn)為NO)
@property (nonatomic, assign) BOOL isAnimation;

/// 評(píng)分樣式 (XKWholeStarStyle 整星評(píng)論 XKHalfStarStyle 半星評(píng)論 XKIncompleteStarStyle 不完整星評(píng)論)
@property (nonatomic, assign) XKStarRateStyle rateStyle;

/// 代理
@property (nonatomic, weak) id<XKStarRateViewDelegate> delegate;

/**
 初始化方法

 @param frame 控件frame
 @param numberOfStars 星星數(shù)量
 @param rateStyle 評(píng)分樣式 (XKWholeStarStyle 整星評(píng)論 XKHalfStarStyle 半星評(píng)論 XKIncompleteStarStyle 不完整星評(píng)論)
 @param isAnimation 是否動(dòng)畫
 @param delegate 代理
 @return XKStarRateView
 */
- (instancetype)initWithFrame:(CGRect)frame
                numberOfStars:(NSInteger)numberOfStars
                    rateStyle:(XKStarRateStyle)rateStyle
                  isAnination:(BOOL)isAnimation
                     delegate:(id<XKStarRateViewDelegate>)delegate;


/**
 初始化方法

 @param frame 控件frame
 @param starRateSelectedBlock 點(diǎn)擊星星的回調(diào)
 @return XKStarRateView
 */
- (instancetype)initWithFrame:(CGRect)frame
        starRateSelectedBlock:(XKStarRateSelectedBlock)starRateSelectedBlock;


/**
 初始化方法

 @param frame 控件frame
 @param numberOfStars 星星數(shù)量
 @param rateStyle 評(píng)分樣式 (XKWholeStarStyle 整星評(píng)論 XKHalfStarStyle 半星評(píng)論 XKIncompleteStarStyle 不完整星評(píng)論)
 @param isAnimation 是否動(dòng)畫
 @param starRateSelectedBlock 點(diǎn)擊星星的回調(diào)
 @return XKStarRateView
 */
- (instancetype)initWithFrame:(CGRect)frame
                numberOfStars:(NSInteger)numberOfStars
                    rateStyle:(XKStarRateStyle)rateStyle
                  isAnination:(BOOL)isAnimation
        starRateSelectedBlock:(XKStarRateSelectedBlock)starRateSelectedBlock;

@end

這里提供了三種樣式供選擇左腔,整星,半星捅儒,任意星液样。以及代理和Block兩種方式獲得當(dāng)前控件顯示所對(duì)應(yīng)的分?jǐn)?shù)。還提供了一個(gè)可選動(dòng)畫的屬性巧还。

在實(shí)現(xiàn)的過(guò)程中鞭莽,首先定義一些必要的屬性參數(shù)。

typedef void(^completeBlock)(CGFloat currentScore);

@interface XKStarRateView ()

@property (nonatomic, strong) UIView *foregroundStarView;

@property (nonatomic, strong) UIView *backgroundStarView;

@property (nonatomic, assign) NSInteger numberOfStars;

@property (nonatomic, assign) CGFloat currentScore;

@property (nonatomic, strong) completeBlock complete;

@end

接下來(lái)聲明一個(gè)方法創(chuàng)建需要的視圖

/**
 根據(jù)圖片名稱創(chuàng)建StarView

 @param imageName 圖片名稱
 */
- (UIView *)createStarViewWithImageName:(NSString *)imageName {
    
    UIView *view = [[UIView alloc] initWithFrame:self.bounds];
    
    view.clipsToBounds = YES;
    
    view.backgroundColor = [UIColor clearColor];
    
    for (NSInteger i = 0; i < self.numberOfStars; i ++) {
        
        UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
        
        imageView.frame = CGRectMake(i * self.bounds.size.width / self.numberOfStars, 0, self.bounds.size.width / self.numberOfStars, self.bounds.size.height);
        
        imageView.contentMode = UIViewContentModeScaleAspectFit;
        
        [view addSubview:imageView];
    }
    
    return view;
}

初始化視圖

/**
 初始化評(píng)論視圖
 */
- (void)initStarView {
    
    self.foregroundStarView = [self createStarViewWithImageName:NormalImageName];
    
    self.backgroundStarView = [self createStarViewWithImageName:SelectedImageName];
    
    self.foregroundStarView.frame = CGRectMake(0, 0, self.bounds.size.width * _currentScore / self.numberOfStars, self.bounds.size.height);
    
    [self addSubview:self.backgroundStarView];
    
    [self addSubview:self.foregroundStarView];
}

視圖什么的都創(chuàng)建好了麸祷,接著處理事件澎怒,這里的點(diǎn)擊事件和滑動(dòng)事件我并沒(méi)有去給視圖添加手勢(shì),而是直接放到視圖的Touch事件中去處理的阶牍。

#pragma mark -- touch事件處理

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    [event touchesForView:self];
    
    NSSet *allTouches = [event allTouches];
    
    UITouch *touch = [allTouches anyObject];
    
    CGPoint point = [touch locationInView:[touch view]];
    
    CGFloat offset = point.x;
    
    CGFloat realStarScore = offset / (self.bounds.size.width / self.numberOfStars);
    
    [self handleRealStarScore:realStarScore];
}

- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    [event touchesForView:self];
    
    NSSet *allTouches = [event allTouches];
    
    UITouch *touch = [allTouches anyObject];
    
    CGPoint point = [touch locationInView:[touch view]];
    
    CGFloat offset = point.x;
    
    CGFloat realStarScore = offset / (self.bounds.size.width / self.numberOfStars);
    
    [self handleRealStarScore:realStarScore];
}

根據(jù)偏移量計(jì)算最終的評(píng)分喷面,這里根據(jù)選擇不同的樣式計(jì)算方法有不一樣的地方星瘾。

/**
 根據(jù)偏移量計(jì)算最終的評(píng)分

 @param realStarScore 真實(shí)的偏移量
 */
- (void)handleRealStarScore:(CGFloat)realStarScore {
    
    switch (_rateStyle) {
            
        case XKWholeStarStyle:
            
            self.currentScore = ceilf(realStarScore);
            
            break;
            
        case XKHalfStarStyle:
            
            self.currentScore = roundf(realStarScore) > realStarScore ? ceilf(realStarScore) : (ceilf(realStarScore) - 0.5);
            
            break;
            
        case XKIncompleteStarStyle:
            
            self.currentScore = realStarScore;
            
            break;
            
        default:
            
            break;
    }
}

這里主要的就是兩個(gè)C語(yǔ)言函數(shù)的使用。

  • round:如果參數(shù)是小數(shù)惧辈,則求本身的四舍五入琳状。
  • ceilf:如果參數(shù)是小數(shù),則向上取整盒齿。

拿到當(dāng)前的偏移量計(jì)算出來(lái)的分?jǐn)?shù)之后念逞,在setter方法中將這個(gè)值傳出去。并且刷新視圖县昂。

- (void)setCurrentScore:(CGFloat)currentScore {
    
    if (_currentScore == currentScore) {
        
        return;
    }
    
    if (currentScore < 0) {
        
        _currentScore = 0;
        
    } else if (currentScore > _numberOfStars) {
        
        _currentScore = _numberOfStars;
        
    } else {
        
        _currentScore = currentScore;
    }
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(starRateView:currentScore:)]) {
        
        [self.delegate starRateView:self currentScore:_currentScore];
    }
    
    if (self.complete) {
        
        _complete(_currentScore);
    }
    
    [self setNeedsLayout];
}

- (void)layoutSubviews 方法中肮柜,去改變 foregroundStarView 的frame即可。

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    __weak XKStarRateView *weakSelf = self;
    
    CGFloat animationTimeInterval = self.isAnimation ? 0.2 : 0;
    
    [UIView animateWithDuration:animationTimeInterval animations:^{
        
        weakSelf.foregroundStarView.frame = CGRectMake(0, 0, weakSelf.bounds.size.width * weakSelf.currentScore / self.numberOfStars, weakSelf.bounds.size.height);
    }];
}

到這里倒彰,基本的功能就做完了审洞,構(gòu)造方法中只需要初始化部分參數(shù)就好了。運(yùn)行程序待讳,發(fā)現(xiàn)有一個(gè)問(wèn)題芒澜,就是當(dāng)你選擇了一個(gè)分?jǐn)?shù)之后,在 XKWholeStarStyleXKHalfStarStyle 兩種樣式中创淡,始終沒(méi)有辦法將評(píng)分設(shè)置為0痴晦,問(wèn)題出在 - (void)handleRealStarScore:(CGFloat)realStarScore 這個(gè)方法中使用到的兩個(gè)C語(yǔ)言函數(shù)。這里最后也沒(méi)有去在想其他的方式來(lái)實(shí)現(xiàn)琳彩。在這個(gè)方法中手動(dòng)的設(shè)置了一下誊酌,當(dāng) realStarScore比0.5還小的時(shí)候,就直接讓分?jǐn)?shù)為0露乏。簡(jiǎn)單粗暴碧浊。

/**
 根據(jù)偏移量計(jì)算最終的評(píng)分

 @param realStarScore 真實(shí)的偏移量
 */
- (void)handleRealStarScore:(CGFloat)realStarScore {
    
    switch (_rateStyle) {
            
        case XKWholeStarStyle:
            
            if (realStarScore < 0.5) {
                
                self.currentScore = 0;
                
            } else {
                
                self.currentScore = ceilf(realStarScore);
            }
            
            break;
            
        case XKHalfStarStyle:
            
            if (realStarScore < 0.4) {
                
                self.currentScore = 0;
                
            } else {
                
                self.currentScore = roundf(realStarScore) > realStarScore ? ceilf(realStarScore) : (ceilf(realStarScore) - 0.5);
            }
            
            break;
            
        case XKIncompleteStarStyle:
            
            self.currentScore = realStarScore;
            
            break;
            
        default:
            
            break;
    }
}

最后,整個(gè)實(shí)現(xiàn)文件的代碼如下

#import "XKStarRateView.h"

#define NormalImageName @"b27_icon_star_yellow"

#define SelectedImageName @"b27_icon_star_gray"

typedef void(^completeBlock)(CGFloat currentScore);

@interface XKStarRateView ()

@property (nonatomic, strong) UIView *foregroundStarView;

@property (nonatomic, strong) UIView *backgroundStarView;

@property (nonatomic, assign) NSInteger numberOfStars;

@property (nonatomic, assign) CGFloat currentScore;

@property (nonatomic, strong) completeBlock complete;

@end

@implementation XKStarRateView

#pragma mark -- 構(gòu)造方法

- (instancetype)initWithFrame:(CGRect)frame {
    
    if (self = [super initWithFrame:frame]) {
        
        _numberOfStars = 5;
        
        _rateStyle = XKWholeStarStyle;
        
        [self initStarView];
    }
    
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
                numberOfStars:(NSInteger)numberOfStars
                    rateStyle:(XKStarRateStyle)rateStyle
                  isAnination:(BOOL)isAnimation
                     delegate:(id<XKStarRateViewDelegate>)delegate {
    
    if (self = [super initWithFrame:frame]) {
        
        _numberOfStars = numberOfStars;
        
        _rateStyle = rateStyle;
        
        _isAnimation = isAnimation;
        
        _delegate = delegate;
        
        [self initStarView];
    }
    
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
        starRateSelectedBlock:(XKStarRateSelectedBlock)starRateSelectedBlock{
    
    if (self = [super initWithFrame:frame]) {
        
        _numberOfStars = 5;
        
        _rateStyle = XKWholeStarStyle;
        
        _complete = ^(CGFloat currentScore){
            
            starRateSelectedBlock(currentScore);
        };
        
        [self initStarView];
    }
    
    return self;
}

- (instancetype)initWithFrame:(CGRect)frame
                numberOfStars:(NSInteger)numberOfStars
                    rateStyle:(XKStarRateStyle)rateStyle
                  isAnination:(BOOL)isAnimation
        starRateSelectedBlock:(XKStarRateSelectedBlock)starRateSelectedBlock {
    
    if (self = [super initWithFrame:frame]) {
        
        _numberOfStars = numberOfStars;
        
        _rateStyle = rateStyle;
        
        _isAnimation = isAnimation;
        
        _complete = ^(CGFloat currentScore) {
            
            starRateSelectedBlock(currentScore);
        };
        
        [self initStarView];
    }
    
    return self;
}

#pragma mark -- 私有方法

/**
 初始化評(píng)論視圖
 */
- (void)initStarView {
    
    self.foregroundStarView = [self createStarViewWithImageName:NormalImageName];
    
    self.backgroundStarView = [self createStarViewWithImageName:SelectedImageName];
    
    self.foregroundStarView.frame = CGRectMake(0, 0, self.bounds.size.width * _currentScore / self.numberOfStars, self.bounds.size.height);
    
    [self addSubview:self.backgroundStarView];
    
    [self addSubview:self.foregroundStarView];
}

/**
 根據(jù)圖片名稱創(chuàng)建StarView

 @param imageName 圖片名稱
 */
- (UIView *)createStarViewWithImageName:(NSString *)imageName {
    
    UIView *view = [[UIView alloc] initWithFrame:self.bounds];
    
    view.clipsToBounds = YES;
    
    view.backgroundColor = [UIColor clearColor];
    
    for (NSInteger i = 0; i < self.numberOfStars; i ++) {
        
        UIImageView *imageView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:imageName]];
        
        imageView.frame = CGRectMake(i * self.bounds.size.width / self.numberOfStars, 0, self.bounds.size.width / self.numberOfStars, self.bounds.size.height);
        
        imageView.contentMode = UIViewContentModeScaleAspectFit;
        
        [view addSubview:imageView];
    }
    
    return view;
}

/**
 根據(jù)偏移量計(jì)算最終的評(píng)分

 @param realStarScore 真實(shí)的偏移量
 */
- (void)handleRealStarScore:(CGFloat)realStarScore {
    
    switch (_rateStyle) {
            
        case XKWholeStarStyle:
            
            if (realStarScore < 0.5) {
                
                self.currentScore = 0;
                
            } else {
                
                self.currentScore = ceilf(realStarScore);
            }
            
            break;
            
        case XKHalfStarStyle:
            
            if (realStarScore < 0.4) {
                
                self.currentScore = 0;
                
            } else {
                
                self.currentScore = roundf(realStarScore) > realStarScore ? ceilf(realStarScore) : (ceilf(realStarScore) - 0.5);
            }
            
            break;
            
        case XKIncompleteStarStyle:
            
            self.currentScore = realStarScore;
            
            break;
            
        default:
            
            break;
    }
}

#pragma mark -- touch事件處理

- (void)touchesBegan:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    [event touchesForView:self];
    
    NSSet *allTouches = [event allTouches];
    
    UITouch *touch = [allTouches anyObject];
    
    CGPoint point = [touch locationInView:[touch view]];
    
    CGFloat offset = point.x;
    
    CGFloat realStarScore = offset / (self.bounds.size.width / self.numberOfStars);
    
    [self handleRealStarScore:realStarScore];
}

- (void)touchesMoved:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event {
    
    [event touchesForView:self];
    
    NSSet *allTouches = [event allTouches];
    
    UITouch *touch = [allTouches anyObject];
    
    CGPoint point = [touch locationInView:[touch view]];
    
    CGFloat offset = point.x;
    
    CGFloat realStarScore = offset / (self.bounds.size.width / self.numberOfStars);
    
    [self handleRealStarScore:realStarScore];
}

- (void)layoutSubviews {
    
    [super layoutSubviews];
    
    __weak XKStarRateView *weakSelf = self;
    
    CGFloat animationTimeInterval = self.isAnimation ? 0.2 : 0;
    
    [UIView animateWithDuration:animationTimeInterval animations:^{
        
        weakSelf.foregroundStarView.frame = CGRectMake(0, 0, weakSelf.bounds.size.width * weakSelf.currentScore/self.numberOfStars, weakSelf.bounds.size.height);
    }];
}

#pragma mark -- setter方法

- (void)setCurrentScore:(CGFloat)currentScore {
    
    if (_currentScore == currentScore) {
        
        return;
    }
    
    if (currentScore < 0) {
        
        _currentScore = 0;
        
    } else if (currentScore > _numberOfStars) {
        
        _currentScore = _numberOfStars;
        
    } else {
        
        _currentScore = currentScore;
    }
    
    if (self.delegate && [self.delegate respondsToSelector:@selector(starRateView:currentScore:)]) {
        
        [self.delegate starRateView:self currentScore:_currentScore];
    }
    
    if (self.complete) {
        
        _complete(_currentScore);
    }
    
    [self setNeedsLayout];
}

@end

全部的代碼都在這里了瘟仿。同樣的箱锐,需要的朋友可以點(diǎn)擊這里下載Demo工程。如果在使用過(guò)程中發(fā)現(xiàn)問(wèn)題歡迎留言提出劳较。謝謝驹止!

特別感謝

在代碼封裝的過(guò)程中有參考這里的代碼 在此感謝。

最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
  • 序言:七十年代末观蜗,一起剝皮案震驚了整個(gè)濱河市臊恋,隨后出現(xiàn)的幾起案子,更是在濱河造成了極大的恐慌墓捻,老刑警劉巖捞镰,帶你破解...
    沈念sama閱讀 217,277評(píng)論 6 503
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件,死亡現(xiàn)場(chǎng)離奇詭異,居然都是意外死亡岸售,警方通過(guò)查閱死者的電腦和手機(jī),發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 92,689評(píng)論 3 393
  • 文/潘曉璐 我一進(jìn)店門厂画,熙熙樓的掌柜王于貴愁眉苦臉地迎上來(lái)凸丸,“玉大人,你說(shuō)我怎么就攤上這事袱院∈郝” “怎么了?”我有些...
    開(kāi)封第一講書人閱讀 163,624評(píng)論 0 353
  • 文/不壞的土叔 我叫張陵忽洛,是天一觀的道長(zhǎng)腻惠。 經(jīng)常有香客問(wèn)我,道長(zhǎng)欲虚,這世上最難降的妖魔是什么集灌? 我笑而不...
    開(kāi)封第一講書人閱讀 58,356評(píng)論 1 293
  • 正文 為了忘掉前任,我火速辦了婚禮复哆,結(jié)果婚禮上欣喧,老公的妹妹穿的比我還像新娘。我一直安慰自己梯找,他們只是感情好唆阿,可當(dāng)我...
    茶點(diǎn)故事閱讀 67,402評(píng)論 6 392
  • 文/花漫 我一把揭開(kāi)白布。 她就那樣靜靜地躺著锈锤,像睡著了一般驯鳖。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上久免,一...
    開(kāi)封第一講書人閱讀 51,292評(píng)論 1 301
  • 那天浅辙,我揣著相機(jī)與錄音,去河邊找鬼妄壶。 笑死摔握,一個(gè)胖子當(dāng)著我的面吹牛,可吹牛的內(nèi)容都是我干的丁寄。 我是一名探鬼主播氨淌,決...
    沈念sama閱讀 40,135評(píng)論 3 418
  • 文/蒼蘭香墨 我猛地睜開(kāi)眼,長(zhǎng)吁一口氣:“原來(lái)是場(chǎng)噩夢(mèng)啊……” “哼伊磺!你這毒婦竟也來(lái)了盛正?” 一聲冷哼從身側(cè)響起,我...
    開(kāi)封第一講書人閱讀 38,992評(píng)論 0 275
  • 序言:老撾萬(wàn)榮一對(duì)情侶失蹤屑埋,失蹤者是張志新(化名)和其女友劉穎豪筝,沒(méi)想到半個(gè)月后,有當(dāng)?shù)厝嗽跇?shù)林里發(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 45,429評(píng)論 1 314
  • 正文 獨(dú)居荒郊野嶺守林人離奇死亡续崖,尸身上長(zhǎng)有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點(diǎn)故事閱讀 37,636評(píng)論 3 334
  • 正文 我和宋清朗相戀三年敲街,在試婚紗的時(shí)候發(fā)現(xiàn)自己被綠了。 大學(xué)時(shí)的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片严望。...
    茶點(diǎn)故事閱讀 39,785評(píng)論 1 348
  • 序言:一個(gè)原本活蹦亂跳的男人離奇死亡多艇,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出像吻,到底是詐尸還是另有隱情峻黍,我是刑警寧澤,帶...
    沈念sama閱讀 35,492評(píng)論 5 345
  • 正文 年R本政府宣布拨匆,位于F島的核電站姆涩,受9級(jí)特大地震影響,放射性物質(zhì)發(fā)生泄漏惭每。R本人自食惡果不足惜骨饿,卻給世界環(huán)境...
    茶點(diǎn)故事閱讀 41,092評(píng)論 3 328
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望洪鸭。 院中可真熱鬧样刷,春花似錦、人聲如沸览爵。這莊子的主人今日做“春日...
    開(kāi)封第一講書人閱讀 31,723評(píng)論 0 22
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽(yáng)蜓竹。三九已至箕母,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間俱济,已是汗流浹背嘶是。 一陣腳步聲響...
    開(kāi)封第一講書人閱讀 32,858評(píng)論 1 269
  • 我被黑心中介騙來(lái)泰國(guó)打工, 沒(méi)想到剛下飛機(jī)就差點(diǎn)兒被人妖公主榨干…… 1. 我叫王不留蛛碌,地道東北人聂喇。 一個(gè)月前我還...
    沈念sama閱讀 47,891評(píng)論 2 370
  • 正文 我出身青樓,卻偏偏與公主長(zhǎng)得像蔚携,于是被迫代替她去往敵國(guó)和親希太。 傳聞我的和親對(duì)象是個(gè)殘疾皇子,可洞房花燭夜當(dāng)晚...
    茶點(diǎn)故事閱讀 44,713評(píng)論 2 354

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

  • Android 自定義View的各種姿勢(shì)1 Activity的顯示之ViewRootImpl詳解 Activity...
    passiontim閱讀 172,104評(píng)論 25 707
  • 發(fā)現(xiàn) 關(guān)注 消息 iOS 第三方庫(kù)酝蜒、插件誊辉、知名博客總結(jié) 作者大灰狼的小綿羊哥哥關(guān)注 2017.06.26 09:4...
    肇東周閱讀 12,102評(píng)論 4 62
  • ¥開(kāi)啟¥ 【iAPP實(shí)現(xiàn)進(jìn)入界面執(zhí)行逐一顯】 〖2017-08-25 15:22:14〗 《//首先開(kāi)一個(gè)線程,因...
    小菜c閱讀 6,408評(píng)論 0 17
  • 昨日邀跃,中國(guó)首艘國(guó)產(chǎn)航母下水的消息在全世界刷屏,堪稱巨龍入海蛙紫,橫空出世拍屑,舉國(guó)歡騰,世人矚目惊来。當(dāng)然丽涩,這是靠強(qiáng)硬的技術(shù)實(shí)...
    滴水溫柔閱讀 339評(píng)論 0 0
  • 你,我的妞妞继准,天真活潑的三歲小姑娘枉证。你在我最好的年華出現(xiàn),讓我成為了你的媽媽移必,我要感謝你室谚,是你,完整了我的人生崔泵。...
    玲小夢(mèng)閱讀 545評(píng)論 0 2