Advertise here

Advertise here

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Google Sign In with OpenID

CGRect change height

gwggwg Posts: 3New Users
edited July 2009 in iPhone SDK Development
Searching for this for days. I done a lot a tutorials that show how to move a subview around the view. I only want to move the height, the rest of the subview would not move.I also don't want the image to move, (just how much you see of the image), I also do not need to crop. Any pointers on this would be very appreciated.
Post edited by gwg on


  • PelaezPelaez Posts: 12Registered Users
    edited July 2009
    I guess you could just access the height and change it:
    view.frame.size.height = SOMETHING;
    (If you check the frameworks, you'll realize that height is a CGFloat, part of a CGSize structure, size is a CGSize structure, part of a CGRect structure, frame is a CGRect, and frame is a property of UIView)

    Although if that doesn't work, you could just make a new frame, and use the old properties that you do need, in this case:
    view.frame = CGRectMake(frame.origin.x, frame.origin.y, frame.size.width, SOMETHING);
  • gwggwg Posts: 3New Users
    edited July 2009
    For clarification this is what I want to do. I need the height of the rectangle to correspond to the touch event (where the user's finger is)Kind of like split view controller, but I do not want the controller bars .
  • gwggwg Posts: 3New Users
    edited July 2009
    I have spent weeks studying tutorials, reading books, forums...I have learned a lot , but nothing has anything like I know the height is a size and not a point. Do I need to use CGGetMAXX? You can't imagine my appreciation for any help. I have uploaded a pic to explain. (I think you have to click example)I would also like to build in interface builder.
    1 x 1 - 9K
Sign In or Register to comment.