iOS storyboard 設置 UIscrollview contentsize

stackoverflow.com/questions/1… 參考這篇文章。xcode

目前我用的xcode11不須要答主那麼多步驟,經測試只要增長兩個keypath就能夠了ide

6: Click on your scrollview and click on Identity Inspector.測試

7: Add a User Defined runtime attribute with KeyPath of contentSize then type of SIZE and put in your content size. For me it is (320, 1000).ui

8: Add a runtime attribute with KeyPath frame with Type RECT and 0,0,320,416.code

1.選中你的scrollview,點開identity InspectorM
2.在user defined runtime attribute欄裏增長兩個keypath,一個是contentSize,類型是SIZE,填入寬高,例如(320,1000)。一個是frame,類型是RECT, 例如0,0,320,416get

相關文章
相關標籤/搜索