Closed emleeh closed 8 years ago
@emleeh Hey sorry to hear that, if you send me a sample project i'd be happy to debug it! lukejamesgeiger@gmail.com :)
@lukegeiger That would be amazing, thank you!
This is the bones of the problem, but I'll put together a quick project and send it to you too so you can see.
`if (![MFMessageComposeViewController canSendText]) { NSLog(@"Message services are not available."); }else{
MFMessageComposeViewController *composeVC = [[MFMessageComposeViewController alloc]init];
composeVC.messageComposeDelegate = self;
// Configure the fields of the interface.
composeVC.recipients = @[@"14085551212"];
composeVC.body = @"Hello from California!";
LGSemiModalNavViewController *semiModal = [[LGSemiModalNavViewController alloc]initWithRootViewController:composeVC];
//Make sure to set a height on the view controller here.
semiModal.view.frame = CGRectMake(0, 0, self.view.frame.size.width, (self.view.frame.size.height/6)*5);
//Selected customization properties, see more in the header of the LGSemiModalNavViewController
semiModal.backgroundShadeColor = [UIColor blackColor];
semiModal.animationSpeed = 0.35f;
semiModal.tapDismissEnabled = YES;
semiModal.backgroundShadeAlpha = 0.4;
semiModal.scaleTransform = CGAffineTransformMakeScale(.94, .94);
[self presentViewController:semiModal animated:YES completion:nil];
}
`
@lukegeiger Also, it seems that viewDidAppear and viewDidLoad aren't called when the semi modal is dismissed. Is there any way of fixing this?
Thanks again!
@emleeh Thanks so much for sending over the sample project! I have figured out what is going wrong.
Thank you so much for being so helpful. I really appreciate it. I figured out that question two was my fault alright, sorry about that!
Best of luck with everything and thanks again.
Hi,
One good solution for dealing with 2) is using:
[self.parentViewController beginAppearanceTransition:YES animated:YES];
On the completion block after the semi modal is dismissed, that way all the necessary view lifecycle methods will be automatically triggered.
Cheers.
hey @apascual this repository is no longer maintained, but feel free to open up a pull request and i'll try to merge it in. thanks!
Hi there, I'm trying to embed an MFMessageComposeViewController into the semi modals and it will not work. I keep getting an error saying I cannot push a Navigation Controller. This does not happen with any view controllers from the storyboard. It happens with the Image Picker too.
Is there any solution to this problem? Thank you!