开发者

Dropping MKMapView into Interface Builder

开发者 https://www.devze.com 2023-03-10 13:56 出处:网络
I\'m using XCode 4 and I just created a subclass of UIViewController, status bar enabled (grey), and dropped in a MKMapView.My UIView has x,y and w,h of

I'm using XCode 4 and I just created a subclass of UIViewController, status bar enabled (grey), and dropped in a MKMapView. My UIView has x,y and w,h of

(0,20) / (320,460)

Then I click on my MKMapView and it ha开发者_JAVA技巧s coordinates of:

(0,0) / (320, 460)

Is there a reason that IB doesn't resize itself so the MKMapView will take up the entire screen by making it (0,0)/(320, 480), or putting itself at (0,20)/(320,460)?

The picture below should identify my problem. Sorry if I am missing something super obvious. Thanks.

Dropping MKMapView into Interface Builder


If you add any subview inside a view(container), then that container is the world for that subview, and it'll have co-ordinate according to that. That's why your map view have coordinate(0,0).

0

精彩评论

暂无评论...
验证码 换一张
取 消