简体   繁体   中英

setting Y-Axis value of subview in iPhone

[selectorView setFrame:CGRectOffset([selectorView frame], 0, -selectorView.frame.size.height)]

In the above code I want to change the value of Y-axis for my subview, as it gets visible from the top of screen and hides my header and search bar. I want to set it just beneath to search bar.

How can I do that ?

Before visibility

在此处输入图片说明

After when subview gets visible

在此处输入图片说明

Try this:

[selectorView setFrame:CGRectMake(<CGFloat x> , <CGFloat y>, <CGFloat width>, <CGFloat height>)];

Hope it works for You

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