简体   繁体   中英

Keeping an image view out of scrollview scope. Xcode, Swift

Please take a look at an image below 在此处输入图片说明 There is a scroll view. But I don't want an imageView(topBar) move. How can I keep an image view out of scrollview scope? (I mean fixed topBar, no move) With a constraint? And managing the constraint from code behind during the scroll?

Move the top bar image so that it isn't in the scrollview. It's parent should be the View0 Outlet , then you can constrain it however you want without it moving in then scrollview.

Using a stackView with vertical setting and free form. In this case, you can lock the height of topBar.

在此处输入图片说明

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