Giter VIP home page Giter VIP logo

xcfapp's Introduction

XCFAPP

高仿下厨房APP

2016-01-04

添加单例

static id instance_;

  • (instancetype)sharedInstance{ static dispatch_once_t onceToken; dispatch_once(&onceToken, ^{ instance_ = [[self alloc] init]; }); return instance_; }

2015-12-22

修改系统的UITableView的分割线

[self.subviews enumerateObjectsUsingBlock:^(__kindof UIView * _Nonnull subView, NSUInteger idx, BOOL * _Nonnull stop) {

   if ([subView isKindOfClass:NSClassFromString(@"_UITableViewCellSeparatorView")]) {
        subView.x = 0;
       subView.width = ScreenWidth;
       subView.backgroundColor = [XCFColor colorTableSeparatorColor];
   }

}];

2015-12-21

查看我添加RAC的代码位置请使用 FIXME

image 添加大神讲的教程RAC,详细教程找码神吴彦祖 最常用的几招:(死记硬背都能会的) target-action: 文本框事件: UITextField * textField = [[UITextField alloc]init]; @weakify(self); // _weak typeof(self) self_weak = self;

[textField mas_makeConstraints:^(MASConstraintMaker *make) {
    
    @strongify(self);   //  __strong __typeof__(self) self = self_weak_;
    make.size.mas_equalTo(CGSizeMake(180, 40));
    make.center.equalTo(self.view);
}];

[[textField rac_signalForControlEvents:UIControlEventEditingChanged]
subscribeNext:^(id x) { LxDBAnyVar(x); }];

[textField.rac_textSignal subscribeNext:^(id x) { LxDBAnyVar(x);}];

Tip: id x -> NSString * text

手势:(不待演示老式的写法了)

self.view.userInteractionEnabled = YES;

UITapGestureRecognizer * tap = [[UITapGestureRecognizer alloc]init];
[[tap rac_gestureSignal] subscribeNext:^(UITapGestureRecognizer * tap) {
   
    LxDBAnyVar(tap);
}];
[self.view addGestureRecognizer:tap];

2015-12-20

添加北京四中网校的大神 Developer.Lx的打印

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.