masonary是乙個給控制項新增約束條件的第三方庫,它是輕量級的布局框架。它和autolayout作用差不多。
支援一下屬性
@property (nonatomic, strong, readonly) masconstraint *left;
@property (nonatomic, strong, readonly) masconstraint *top;
@property (nonatomic, strong, readonly) masconstraint *right;
@property (nonatomic, strong, readonly) masconstraint *bottom;
@property (nonatomic, strong, readonly) masconstraint *leading;
@property (nonatomic, strong, readonly) masconstraint *trailing;
@property (nonatomic, strong, readonly) masconstraint *width;
@property (nonatomic, strong, readonly) masconstraint *height;
@property (nonatomic, strong, readonly) masconstraint *centerx;
@property (nonatomic, strong, readonly) masconstraint *centery;
@property (nonatomic, strong, readonly) masconstraint *baseline;
使用1、將檢視居中顯示
uiview *view = [uiview new];
view.backgroundcolor = [uicolor redcolor];
[self.view addsubview:view];
//新增新的約束條件
[view mas_makeconstraints:^(masconstraintmaker *make)
[container mas_makeconstraints:^(masconstraintmaker *make) {
make.bottom.equalto(lastview.mas_bottom);
vcbuild的簡單使用
vcbuild 命令列 更新 2007 年 11 月 vcbuild 工具使用以下命令列語法來生成 visual c 專案和解決方案。複製 vcbuild options project solution config all 標誌 options生成選項。有關更多資訊,請參見 vcbuild 選項...
QList的簡單使用
qlistlist list 1 2 3 4 5 6 7 8 qlist的插入 voidinsert int i,const t value 在qlist其中某個位置插入value,假如沒 宣告i i 預設size 及在最後插入value iteratorinsert iterator before...
QTreeWidget的簡單使用
qtreewidget是一種樹形的部件,它以樹的形式顯示各個項,它的每個項使用qtreewidgetitem來表示。qtreewidgetitem的值的表示都是用qstringlist來表示的。簡單的說明一下 for int i 0 i 3 i for int i 0 i 3 i treewidge...