public MyCircleViewDelegate(UINavigationController navigationController, UIButton resetBtn, PCLockLabel msgLabel, Action <PCCircleView> action) { this.navigationController = navigationController; this.resetBtn = resetBtn; this.msgLabel = msgLabel; this.action = action; }
public override void ViewDidLoad() { base.ViewDidLoad(); //在加载视图后进行任何其他设置 Title = @"验证手势解锁"; PCCircleView lockView = new PCCircleView(); //lockView.Delegate = this; lockView.Type = CircleViewType.CircleViewTypeVerify; View.AddSubview(lockView); msgLabel = new PCLockLabel(new CGRect(0, 0, PCCircleViewConst.kScreenW, 14)); msgLabel.Center = new CGPoint(PCCircleViewConst.kScreenW / 2, lockView.Frame.GetMinY() - 30); msgLabel.ShowNormalMsg(PCCircleViewConst.gestureTextOldGesture); View.AddSubview(msgLabel); }
/// <summary> 界面相同部分生成器 /// </summary> void SetupSameUI() { // 创建导航栏右边按钮 NavigationItem.RightBarButtonItem = ItemWithTitle("重设", (int)buttonTag.buttonTagReset); // 解锁界面 PCCircleView lockView = new PCCircleView(); this.lockView = lockView; View.AddSubview(this.lockView); PCLockLabel msgLabelNew = new PCLockLabel(new CGRect(0, 0, PCCircleViewConst.kScreenW, 14)); msgLabelNew.Center = new CGPoint(PCCircleViewConst.kScreenW / 2, lockView.Frame.GetMinY() - 30); this.msgLabel = msgLabelNew; View.AddSubview(msgLabel); lockView.Delegate = new MyCircleViewDelegate(NavigationController, resetBtn, msgLabel, InfoViewSelectedSubviewsSameAsCircleView); }