久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

iPhone:在 viewWillAppear 之前 viewDidLoad 之后調用了什

iPhone: What gets called after viewDidLoad before viewWillAppear?(iPhone:在 viewWillAppear 之前 viewDidLoad 之后調用了什么?)
本文介紹了iPhone:在 viewWillAppear 之前 viewDidLoad 之后調用了什么?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

這里的行為真的很奇怪.我有一個內部帶有滾動視圖的視圖,其中包含我的界面.

Really strange behaviour here. I've got a view with a scroll view inside, which contains my interface.

在我的 viewDidLoad 中,我將 scrollView 的框架設置為原點為 0,0.

In my viewDidLoad, I set the frame of my scrollView to have an origin of 0,0.

我在 viewDidLoad 的末尾記錄了原點,它是 0.但是,在我的 viewWillAppear 開頭,原點是 -20.有誰知道可以調用哪種方法來做到這一點?

I log the origin at the end of my viewDidLoad, and it's 0. However, at the start of my viewWillAppear, the origin is -20. Does anyone know what kind of method could get called that would do this?

提前致謝

推薦答案

如果您想知道它可能是什么,您可以嘗試注冊您的視圖以進行鍵值觀察,如下所述:http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html

If you want to find out what it could be, you can try registering your view for key value observing, as described here: http://developer.apple.com/library/ios/#documentation/Cocoa/Conceptual/KeyValueObserving/KeyValueObserving.html

您可以注冊以偵聽 frame 屬性的更改,然后在 observe 方法中設置一個斷點,當您的 origin 設置為奇怪的值時,它應該可以讓您準確地看到堆棧跟蹤的用途.

You can register to listen for changes to the frame property, and then set a breakpoint in the observe method which should let you see exactly what the stacktrace is for when your origin is set to the strange value.

這篇關于iPhone:在 viewWillAppear 之前 viewDidLoad 之后調用了什么?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Stop a UITableView from automatically scrolling(阻止 UITableView 自動滾動)
iOS UIScrollView Lazy Loading(iOS UIScrollView 延遲加載)
using iOS 6.0 SDK and building for iOS 5 Target causes UIScrollView setMinimumZoomScale to fail when running on iOS 5 simulator(在 iOS 5 模擬器上運行時,使用 iOS 6.0 SDK 并為 iOS 5 Target 構建會導致 UIScrollView setMinimumZ
Create partial-screen UIPageViewController programmatically(以編程方式創建部分屏幕 UIPageViewController)
how to make an ImageView zoomable with or without ScrollView.?(如何使用或不使用 ScrollView 使 ImageView 可縮放?)
UIImageView zoom and pinch in UIScrollView(UIImageView 在 UIScrollView 中縮放和捏合)
主站蜘蛛池模板: 一区二区三区四区视频 | 欧美专区在线视频 | 99热热 | 久久成人免费视频 | 免费在线观看一区二区三区 | 亚洲精品久久 | 亚洲国产二区 | www.亚洲成人网 | 成人精品啪啪欧美成 | 国产精品一区二区三区久久 | 九九热视频这里只有精品 | 91精品国产麻豆 | 97色在线观看免费视频 | 日韩有码一区 | 男人天堂色 | 在线观看国产h | 亚洲精品性视频 | 97国产爽爽爽久久久 | h视频在线免费 | 欧美最猛性xxxxx亚洲精品 | 久草日韩| a久久 | 日韩免费视频一区二区 | 久久午夜视频 | 亚洲激情第一页 | 久久91视频| 一区二区三区在线电影 | 国产九九精品 | 欧美日韩一区在线播放 | 欧美激情一区二区三级高清视频 | 天堂网中文字幕在线观看 | 精品日韩在线 | 伊人久麻豆社区 | 久久精品1 | 成人精品在线视频 | 老牛嫩草一区二区三区av | 国产成人av在线 | 中文在线a在线 | 在线欧美一区 | 精品亚洲一区二区三区 | 午夜影院黄 |