對封裝好的視圖進行動態修改
[self.KVOController observe:vc keyPath:@"self.view" options:NSKeyValueObservingOptionInitial|NSKeyValueObservingOptionNew block:^(id observer, id object, NSDictionary *change) {
UIButton *bt = [UIButton new];
[bt setImage:[UIImage imageNamed:@"navi_close"] forState:UIControlStateNormal];
bt.frame = CGRectMake(15, 25, 40, 40);
//bt.backgroundColor = [UIColor redColor];
[vc.view addSubview:bt];
[bt setTapBlock:^(UITapGestureRecognizer *gesture) {
[vc dismissViewControllerAnimated:YES completion:nil];
self.resettingGesPwd = YES;
}];
}
];
對封裝好的視圖進行動態修改