Closed mdpp closed 11 years ago
Add this line in ViewDidLoad of ViewController.m:
[self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext];
It works! many thanks.
On 13 Aug 2013, at 12:41, Chintan R Dave notifications@github.com wrote:
[self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext];
I am using a tabbarcontroller with navigationcontroller. I added [self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext]; but it is not working for me. Can you help.
Thanks.
Have u try setModalPresentationStyle for tabbarcontroller?
Hi! I have used your approach to make a custom modal. It works well if there are only two views, like in your demo. But in my case I have multiple view and then the custom view appear. in this case the black background appears. e.g. I have Login screen -> Home screen -> Options screen -> custom modal. all the previous views have there own navigation controller.
I am using the below code in Options screen view controller, [self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext]; [self setModalPresentationStyle:UIModalPresentationCurrentContext];
Can you please guide me what must be the problem here.
Thanks!
Hi..!!! i tried this [self.navigationController setModalPresentationStyle:UIModalPresentationCurrentContext]; but for me,, black background is coming. kindly help me.
I'm having the same issue, the transition is smooth with presenting view controller visible. But as the transition ends, the background gets black. Were you able to resolve this @Gkrish1110, @azhar-bandri ?
Hi.. From wr u r askin asking this quest ?? Can u send the quest ???
On Thu, Jul 28, 2016 at 11:14 AM, aqeelaslam notifications@github.com wrote:
I'm having the same issue, the transition is smooth with presenting view controller visible. But as the transition ends, the background gets black. Were you able to resolve this @Gkrish1110 https://github.com/Gkrish1110, @azhar-bandri https://github.com/azhar-bandri ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Chintan-Dave/popupDemo/issues/1#issuecomment-235804024, or mute the thread https://github.com/notifications/unsubscribe-auth/AIRDPJ25snvOH40KUH2hB1ymQb8dmrHDks5qaEHKgaJpZM4A5Wng .
Thanks for your answer @Gkrish1110. I was able to solve it.
Here's the code I used if someone comes here in future.
`override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == Segues.SHOW_CAR_SELECTION {
let mySecondController = segue.destinationViewController as! MySecondController
mySecondController.providesPresentationContextTransitionStyle = true
mySecondController.definesPresentationContext = true
mySecondController.modalPresentationStyle = .OverCurrentContext
}
}`
OverCurrentContext
was the key as I was using currentContext
earlier. And there should be no code in the destinationViewController's viewDidLoad method.
Besides that, the segue's properties should be set as
I hope it helps someone someday.
Ya.. Thanks..a lot... Thanks for help..
I am havin another doubt. Can u help me ???
On Thu, Jul 28, 2016 at 12:29 PM, aqeelaslam notifications@github.com wrote:
Thanks for your answer @Gkrish1110 https://github.com/Gkrish1110. I was able to solve it.
Here's the code I used if someone comes here in future.
`override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
if segue.identifier == Segues.SHOW_CAR_SELECTION { let mySecondController = segue.destinationViewController as! MySecondController mySecondController.providesPresentationContextTransitionStyle = true mySecondController.definesPresentationContext = true mySecondController.modalPresentationStyle = .OverCurrentContext }
}`
OverCurrentContext was the key as I was using currentContext earlier. And there should be no code in the destinationViewController's viewDidLoad method.
Besides that, the segue's properties should be set as
[image: screen shot 2016-07-28 at 11 54 01 am] https://cloud.githubusercontent.com/assets/6975647/17203630/0b0beada-54ba-11e6-8cc7-f8c8566f1c1d.png
I hope it helps someone someday.
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Chintan-Dave/popupDemo/issues/1#issuecomment-235815319, or mute the thread https://github.com/notifications/unsubscribe-auth/AIRDPMzQuPiwoVbArXtXZtwbZa5N9bp9ks5qaFNQgaJpZM4A5Wng .
Sure, if I could, why not ?
I am using, NSURLSession ,, for JSON Response...,,
7 more API's I need to call..., then I am savin the datas in local [CoreData]
For that,, I have to show UIProgressView,, I dont know how to do that.
I have used UIProgressView on download task only.......
For this task, I dnt knw.
Hope u understand my question?
My Skype ID: gkrz11
Can u guide me on this ??
On Thu, Jul 28, 2016 at 12:32 PM, aqeelaslam notifications@github.com wrote:
Sure, if I could, why not ?
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Chintan-Dave/popupDemo/issues/1#issuecomment-235815852, or mute the thread https://github.com/notifications/unsubscribe-auth/AIRDPGEdarhdhIVHD75cKJdz_sxy2j7Yks5qaFQNgaJpZM4A5Wng .
I think this isn't relevant to this topic, so should be asked separately. Perhaps an SO question !
Ok thank you...
On Thu, Jul 28, 2016 at 1:01 PM, aqeelaslam notifications@github.com wrote:
I think this isn't relevant to this topic, so should be asked separately. Perhaps an SO question !
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Chintan-Dave/popupDemo/issues/1#issuecomment-235820853, or mute the thread https://github.com/notifications/unsubscribe-auth/AIRDPHvnCGM7PAnZsiXLm-14aPAubf2qks5qaFrKgaJpZM4A5Wng .
really appreciate your demo. I tried to reuse it in my code but it doesn't work like your code does. Only difference is I'm using a navigation controller. Any clue why the "transparent effect" doesn't work?