iphone - UIButtons over a UIImageView Zooming -


O people, this is my first time posting here, and is quite new for iPhone programming. I started just a month ago I've been doing and tinkering with only small tutorial type applications, but anyway, of my question

I currently have a UIScrollView scrollable and zoomable, which will load the UIImageView subview Does, and I want some control over the image view Add (UIButtons), but when I'm in and zoom out, zoom group (Button image).

If I add UIButtons to my UIScrollView and Zoom, then the image zoom and the buttons are located in the original location

If I add UIButtons to my UIImageView, they are correctly Zoom but now there are no buttons that means they lose their interaction.

Later add them to ill by adding them to several arrays.

I would appreciate any help

This is my main viewer. Part of M.

  - (zero) viewDidload   

[scrollView2 setBackgroundColor: [UIColor blackColor]];

  [scrollView2 setCanCancelContentTouches: no]; ScrollView2.clipsToBounds = Yes; // is not the default, we can scroll through our ScrollviewView 2 Indicator style = UIScrollViewIndicatorStyleWhite want to block the drawing; Scroll2ImageView = [[UIImageView alloc] initWithImage: [UIImage imageNamed: @ "bigNH.jpg"]]; [ScrollView2 addSubview: scroll2ImageView]; [ScrollView2 setContentSize: CGSizeMake (scroll2ImageView.frame.size.width, scroll2ImageView.frame.size.height)]; ScrollView2.minimumZoomScale = .5; ScrollView2.maximumZoomScale = 3; ScrollView2.delegate = self; [Scroll Weaver 2 Sets Scroll enabled: Yes]; UIButton * myButton = [UIButtonTypeCustom] with UIButton Button; CGRactNews = CGRactMake (658, 435, 50, 50); In the original position // status and button size myButton.frame = newSize; [MyButton setImage: [UIImage imageNamed: @ "redStop.png"] forState: UIControlStateNormal]; // Adding targets and actions [myButton addTarget: Self action: @Selector (Button: Light) Control events: UIControlEventTouchUpInside]; // Add to a view [scroll2ImageView addSubview: myButton]; [Redline arrowobject: mybutton]; [Scroll2ImageView Release];  

}

This might not possibly help It does not seem that you want to do this.

However, when I want the button associated with scrollview, I add a parent's view, add buttons to that view and also add scrollview to that view. The buttons (buttons) and ScrollViews will be Brother-Sisters. This allows the user to scroll around the contents of ScrollView, while ensuring that the buttons are always in view.

-isdi -


Comments

Popular posts from this blog

asp.net - Javascript/DOM Why is does my form not support submit()? -

sockets - Delphi: TTcpServer, connection reset when reading -

javascript - Classic ASP "ExecuteGlobal" statement acting differently on two servers -