简体   繁体   中英

How to set initial location for image (iphone)

I have a UIImageView along with a UIScrollView. They are both setup correctly and everything is working fine. However, when the view is loaded, it puts up pixel location (0,0) as the starting point (ie the view is top left of the image).. How do I set it up such that only on a viewDidLoad it starts at pixel location say (1000,1000) of the image? I do not care what happens after the user scrolls or zooms in/out

Much obliged.

[UIScrollView setContentOffset:CGPointMake(1000.0, 1000.0)];

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM