DMCustomModalViewController icon indicating copy to clipboard operation
DMCustomModalViewController copied to clipboard

Underlying view's autolayout get's disturbed on exit

Open ericlewis opened this issue 12 years ago • 12 comments

First of all, i love it! I love it love it love it!

But, when utilizing storyboards, and autolayout- there seems to be a sizing issue that causes the app to relayout. will attach images. ios simulator screen shot jun 6 2013 11 33 54 am ios simulator screen shot jun 6 2013 11 33 57 am ios simulator screen shot jun 6 2013 11 33 59 am

hopefully we can work it out! I found that by taking an SS of the underlying view, and animating THAT backwards solves most issues of layout.. I have been exploring my own versions- but your's is still the best. Let me know!

ericlewis avatar Jun 06 '13 18:06 ericlewis

Adding [primaryView setNeedsDisplay]; seems to fix it for that view- but table views still become a different size..

ericlewis avatar Jun 06 '13 18:06 ericlewis

It appears that it could be because of the size of my navbar being slightly different than the typical one..

ericlewis avatar Jun 06 '13 18:06 ericlewis

one more note: it appears resetting the tableviews frame works on finish.

ericlewis avatar Jun 06 '13 19:06 ericlewis

Hmm I never used it in production yet, I plan to integrate with my current app, so I'll do a massive debug. For what I know the animation I did suck, it reset the view everytime, + it don't work in landscape.

If you can send me an example project I could start some debug on it :) I plan to totally redo the animation.

Dimillian avatar Jun 06 '13 20:06 Dimillian

I can see if I can get a decent example together for you, from what i can tell it appears that my custom appearances (which are slightly taller image wise) may have an issue with tables. I solved it by resetting the frame, and subtracting 20 from the height on a successful hide. Landscape is something we don't even support at all- i think it would be a weird paradigm there. We'd love to use it in our Prod, and have made some tiny tweaks that seem to solve most of our problems. such as redraw on finish and reframing. I'll get you an example!

ericlewis avatar Jun 06 '13 20:06 ericlewis

We are also using it in a tab view controller with table views inside, seems to work well. Our internal methods consisted of Screen shotting the parentview overlaying it on to a black bg subview, and manipulating that underneath the rootview, instead of the parentview scaling. but it lacked the integration with controllers that yours had.

ericlewis avatar Jun 06 '13 20:06 ericlewis

Hmm sound nice, don't hesitate to integrate your fixes directly into DMCustomModal and do a pull reques :D

Dimillian avatar Jun 06 '13 20:06 Dimillian

no problem! will do :)

ericlewis avatar Jun 06 '13 21:06 ericlewis

That would be awesome, in some weeks I'll start using it in production. I use it actually, but my views still not complex. The thing is I'm doing everything in code, I've not tested it with Interface Builder nor Storyboarding, that why I need an example :)

Dimillian avatar Jun 06 '13 21:06 Dimillian

yeah no problem, we are doing quick prototyping for a beta, which is essentially production- and plan to move to pure code gradually as we hire. maybe end of day, or tomorrow till i get you an example.

ericlewis avatar Jun 06 '13 21:06 ericlewis

any word on landscape support ?

shobhitkasliwal-zz avatar Oct 06 '13 14:10 shobhitkasliwal-zz

@shobhitkasliwal I think I'll totally rewrite it for iOS 7 only.

Dimillian avatar Oct 06 '13 15:10 Dimillian