Skip to content

Instantly share code, notes, and snippets.

View ZiFy's full-sized avatar

ZiFy ZiFy

  • China
View GitHub Profile
pod lib lint --sources='git@git.56qq.com:iOS-Team/HCBSpecs.git,git@code.ymmoa.com:iOSYmm/MBSpecRepo.git,git@code.ymmoa.com:iOSYmm/YMMSpecRepo.git,https://cdn.cocoapods.org/' --allow-warnings --use-libraries --verbose
def main():
bt = TreeNode.model_with_array([5, 1, 4, None, None, 3, 6])
bt2 = TreeNode.model_with_array([2, 1, 3])
if __name__ == '__main__':
main()
self.closeButton.layer.mask = ({
CAShapeLayer *shapeLayer = [CAShapeLayer layer];
shapeLayer.path = [UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, 80, 34) byRoundingCorners:UIRectCornerBottomLeft | UIRectCornerTopLeft cornerRadii:CGSizeMake(17, 17)].CGPath;
CAShapeLayer *borderLayer = [CAShapeLayer layer];
borderLayer.frame = CGRectMake(0, 0, 80, 34);
borderLayer.path = shapeLayer.path;
borderLayer.lineWidth = 1;
borderLayer.fillColor = [UIColor clearColor].CGColor;
borderLayer.strokeColor = [UIColor colorWithHex:0xF2F2F2].CGColor;
和普通的方法实现差不多,重点只是修改约束后调用
[view.superview layoutIfNeeded];
而已
[view mas_makeConstraints:^(MASConstraintMaker *make) {
make.top.mas_equalTo(400);
make.left.mas_equalTo(100);
- (IBAction)getVoiceCode:(id)sender {
NSString *phone = self.phoneTF.phoneNumber;
if([NSString isNilOrEmpty:phone]){
[self.view makeToast:@"请先输入手机号码,再获取验证码"];
return;
}
NSString *errorMsg = [ZZInputCheck telephoneNumCheck:phone];
if (![NSString isNilOrEmpty:errorMsg]) {
- (void)ymm_maskWillAppear {
// do noting in base
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardAction:) name:UIKeyboardWillShowNotification object:nil];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardAction:) name:UIKeyboardWillHideNotification object:nil];
[self.phoneTF becomeFirstResponder];
self.voiceCodeButton.hidden = YES;
[self updateView];
// self.phoneTF.text = [NSString mbvc_phoneFormate:self.phone];
- (void)actionInvokeArgument1:(NSInteger)arg1 arg2:(NSNumber *)arg2 {
NSLog(@"action: arg1 + arg2=%d", arg1 + [arg2 integerValue]);
}
方案一 IMP
SEL selector = @selector(actionInvokeArgument1:arg2:);
IMP imp = [self methodForSelector:selector];
void (*func)(id, SEL, id) = (void *)imp;
+(void)load{
[super load];
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
Class class = object_getClass((id)self);
Method imgNameMethod = class_getClassMethod(class, @selector(imageNamed:));
Method ym_imgNameMethod = class_getClassMethod(class, @selector(ym_imageNamed:))
;
//
@ZiFy
ZiFy / History|-10a86a95|entries.json
Last active August 5, 2022 03:02
Visual Studio Code Settings Sync Gist
{"version":1,"resource":"file:///Users/jacky/.zz-workspace/code-station/company-code/abc-code/front/joolun-plus-uniapp/pages/groupon/groupon-order-confirm/index.vue","entries":[{"id":"TpyD.vue","source":"searchReplace.source","timestamp":1653877073726},{"id":"nsmO.vue","source":"searchReplace.source","timestamp":1654051796836},{"id":"6Enw.vue","source":"searchReplace.source","timestamp":1654051832517},{"id":"fsN6.vue","source":"searchReplace.source","timestamp":1654051951904},{"id":"F7hC.vue","source":"searchReplace.source","timestamp":1654051968741},{"id":"DRJt.vue","source":"searchReplace.source","timestamp":1654051997148}]}