簡體   English   中英

如何在UIScrollView的上下文中找到UIView的框架?

[英]How do I find the frame of a UIView in the context of a UIScrollView?

我正在嘗試放置一個UIPopoverController來顯示何時點擊UIButton 但是, UIButton放在UIScrollView ,因此其框架由滾動量偏移。

是否有一種簡單的方法可以找到屏幕上下文中出現的視圖框架? 或者我只需要在UIButton框架和UIScrollViewcontentOffset之間進行減法操作?

謝謝!

如果您正在使用- (void)presentPopoverFromRect:(CGRect)rect inView:(UIView *)view permittedArrowDirections:(UIPopoverArrowDirection)arrowDirections animated:(BOOL)animated則您已經在指定要從中呈現的視圖。 只需在你的UIButton 0,0 0,0的UIButton

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM