sdcalertview

Adding constraints in SDCAlertView

浪尽此生 提交于 2019-12-12 21:06:17
问题 I'm using a the pod SDCAlertView, I need to add an imageView + a textField to my content view, however I am having trouble with my constraints, below is my code. let imageView = UIImageView(frame: CGRectMake(0, 0, 100, 100)) imageView.image = UIImage(named: "kalafina") imageView.contentMode = .ScaleAspectFill let alert = AlertController(title: "Testing", message: "1234") imageView.translatesAutoresizingMaskIntoConstraints = false alert.contentView.addSubview(imageView) let

adding a custom view to a alert view

我只是一个虾纸丫 提交于 2019-12-04 13:03:00
问题 i have a problem like this: i want to show a customized view inside a alert view. so i create a separate xib file and designed my interface.and implemented the class for it too.but when i apply below code,it gives me an error. this is the code : UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"Confirm your Action" message:@"Click OK to confirm" delegate:self cancelButtonTitle:@"OK" otherButtonTitles:@"Cancel",nil]; NSArray *subviewArray = [[NSBundle mainBundle] loadNibNamed:@