Tag: 自定义操作

如何将自定义视图放在另一个视图的IOS中

我想通过UIViewController实现下面的自定义视图。 什么是实现它,而不是使用addSubview的最好方法我想用一些更好的东西。 我以前使用以下,但我想现在更好地使用一些事情 [self.view addSubview:NotConnected.view]; [self.view removeFromSuperview]; 我已经使用https://github.com/wimagguc/ios-custom-alertview实现了代码。 我不喜欢使用库所以如何可以自定义UIViewController在另一个UIViewController如上图所示。 我用 – (IBAction)ContinueToPayment:(id)sender { PayByVC *Newpage = [[PayByVC alloc] initWithNibName:@"PayByVC" bundle:nil]; Newpage.checkOutInfoDict=checkOutDict; Newpage.modalPresentationStyle = UIModalPresentationOverCurrentContext; Newpage.modalTransitionStyle = UIModalTransitionStyleCrossDissolve; Newpage.view.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:.4]; Newpage.delegate = self; [self presentViewController:Newpage animated:YES completion:nil]; } 从超级视图中删除我已经使用 [self dismissViewControllerAnimated:YES completion:nil]; 如何将付费视图以所有types的屏幕方向放置在屏幕中央