UrbanApps / UAModalPanel

An animated modal panel alternative for iOS

Home Page:http://code.coneybeare.net/uamodalpanel-an-open-source-modal-panel-alter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

issues with intiWithFrame:CGRectMake

pjaegerhh opened this issue · comments

Hi,

first of all great work.
Unfortunately I'm experiencing an error when not using initWithFrame:self.view.bounds but instead initWithFrame:CGRectMake(40,90,220,100).
The panel is somehow presented but unfortunately in 3 not connected parts. The Background is presented at the correct position, the roundect got an x,y offset of approx 60,80 and the content within gets another offset of about the same.

What's wrong ?

Cheers, Peter

The modal panel wouldn't really be modal if it didn't cover the entire screen. Popups are much better for partial screen popups. The reason why they are staggered is that the x and y values in your rect are not 0, and they all inherit from the parent.

The panel has to be given the frame of the view controller, but if you want to adjust the size of the panel itself, check out the setOuterMargin and setInnerMargin options on the panel.