Code Monkey home page Code Monkey logo

geekobjective-c's Introduction

开发中封装的框架

01-BNVCContainer

继承
	xx : BNVCContainer
重写数组
	- (NSArray<BNCToolbarItem *> *)items {
添加子控制器
	[self addController:vc];
	有需要updateRootView的位置

02-CommonCell

快速构建个人页

03-CheckBox

勾选同意

04-AlertController

封装弹窗提示

05-MGNaVBackBarButtonItem

统一设置导航控制器的返回按钮,modal和push模式

  • 控制器继承MGBaseViewController即可
    • 首页的leftBarButtonItem不用设置
    • 不用设置push控制器和modal出来控制的返回leftBarButtonItem
    • 统一设置能处理2种情况的返回

06-MGPlaceholderTextView

用label实现占位文字的textView,可修改颜色,字体

// 添加一个MGPlaceholderTextView
MGPlaceholderTextView *textView = [[MGPlaceholderTextView alloc] init];
textView.frame = self.view.bounds;
textView.placeholder = @"这是一段占位文字………这是一段占位文字………这是一段占位文字………";
[self.view addSubview:textView];

07-流水线性布局

X-Waterflow

瀑布流框架,不常用

@class MGWaterflowLayout;

@protocol MGWaterflowLayoutDelegate <NSObject>
@required
- (CGFloat)waterflowLayout:(MGWaterflowLayout *)waterflowLayout heightForItemAtIndex:(NSUInteger)index itemWidth:(CGFloat)itemWidth;

@optional
- (NSInteger)columnCountInWaterflowLayout:(MGWaterflowLayout *)waterflowLayout;
- (CGFloat)columnMarginInWaterflowLayout:(MGWaterflowLayout *)waterflowLayout;
- (CGFloat)rowMarginInWaterflowLayout:(MGWaterflowLayout *)waterflowLayout;
- (UIEdgeInsets)edgeInsetsInWaterflowLayout:(MGWaterflowLayout *)waterflowLayout;
@end

@interface MGWaterflowLayout : UICollectionViewLayout
/** 代理 */
@property (nonatomic, weak) id<MGWaterflowLayoutDelegate> delegate;
@end

geekobjective-c's People

Contributors

appke avatar

Watchers

 avatar  avatar

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.