uiview

iPhone - Center UIImage in UIImageView

I have a UIImageView. I get a UIImage from a URL. The image displays in the UIImageView, but I can't get it to center correctly. The UIImage is 80 x 68 pixels. The UIImaveView's size is 90 x 90. When I display the UIImage in the UIImageView the UIImage is shrunken so that it fits, although it is already smaller than the UIImageView....

Gray out view in iphone, how?

I wonder what is the way to gray out portion of a view similar to the way UIAlertView grays out everything except the message box? Right now i use another custom view on top of the target area, but it doesnt look as nice. Any ideas? ...

Custom UITabBarController Problems with View Controllers and Views

Hi there, I'm writing a custom UITabBarController so I can fully control appearance of the tab bar. I've got it all working so I have an array of view controllers that it handles. The controller has a main view which fills the screen, and inside it it has a UIView at the bottom for the tab bar. That tab bar view has a button for each v...

Iphone devolpement Dynamic Flickr Rss graber

Hi, I am trying to adapt http://kosmaczewski.net/2009/03/08/asynchronous-loading-of-images-in-a-uitableview/ to load a specific flickr feed but at the moment when I put in a flick rss feed in definations.h it wont load the images past the thumbnail view // // Definitions.h // AsyncTable // // Created by Adrian on 3/8/09. // Copyrig...

How Do I Force Redrawing (drawRect) of a SubView When it Changes Dimensions?

I have a UIView that contains a row of subclasses of UIView. The subclass has overridden drawRect: and has set contentMode = UIViewContentModeRedraw. As the user squashes and stretches the parent container the child views squash and stretch. As the shape change occurs I would like to have drawRect called repeatedly to change the conten...

iPhone UIView Question. How to get notified when a UIView becomes completely hidden?

I have a have a strip of UIViews that slides horizontally behind a UIView "window". Only the UIViews within the bounds of the "window" are seen. As a view becomes hidden I would like to be notified so that I can perform some task with the just hidden view. What is the best way to do this? ...

Weird anti-aliasing in custom view

I have a custom UIView which is drawn using its -[drawRect:] method. The problem is that the anti-aliasing acts very weird as black lines horizontal or vertical lines are drawn very blurry. If I disable anti-aliasing with CGContextSetAllowsAntialiasing, everything is drawn as expected. Anti-Aliasing: No Anti-Aliasing (which looks li...

UIViewAnimationTransitionCurlUp - how - iphone

I want to animate a view like UIViewAnimationTransitionCurlUp. I don't know the exact way. plz help me. Thanks in advance. ...

iPhone - Multiple UIViewControllers Release

My main UIViewController, (PMGameViewController.h), is the file which my apps delegate calls. There are several buttons on my main UIViewController (PMGameViewController.m). When a button is pressed I do an insertSuvbiew and attach another UIViewController on top. When the mini game is over I simply do a removeFromSubview. This rem...

See a white band at the bottom of screen while adding view to window programatically in iphone?

Hello all, When I developed a view based project in XCode, My view works fine. But when I use a window based project and create a view on my own and try adding it as a subview to window, it gives me a white band at the bottom. I never faced this issue before but facing it first time. Anyone having a solution? Tnx in advance. ...

iPhone - Get Position of UIView within entire UIWindow

The position of a UIView can obviously be determined by view.center or view.frame etc. but this only returns the position of the UIView in relation to it's immediate superview. I need to determine the position of the UIView in the entire 320x480 co-ordinate system. For example, if the UIView is in a UITableViewCell it's position within ...

UIView subclasses default properties

What's the proper way to set a default value for a UIView subclass's property? Although I'm not using them yet, if the XIB provides a value I'd like it to override the default. But if the XIB doesn't provide a value, I'd like my default value. In this case, I'm thinking of a CGFloat value specifically. While it could be set to 0.0 this...

Framing problem with iPhone UIView subviews?

Hi, why can't I get my programmatically created UIScrollView (or plain UIViews) to sit where I want them? I am building a viewcontroller component that builds up a uiscrollview and adds it as a subview to placeholder UIView that was dropped in the design using IB. the main view, with UIView IBOutlet 'ibView' linked to the placeholder v...

How to enable touchEvents (scroll and pan) in MKMapview below a custom UIView?

In a nutshell, I am trying to figure out how to scale the geometry (point, line, and polygon) implemented in a custom view (geometryView) on top of MKMapView (mapView). What I did was.. Create DrawMapViewController. Add the UIBarButtonItems (MAP, PT, LN, PG) on the bottom toolbar. When you click on map button, you are able to pan/...

How to add an UIViewController's view as subview

I have a ViewController which controls many subviews. When I click one of the buttons I initialize another viewcontroller and show it's view as the subview of this view. However the subview exceeds the bounds of the frame for subview and infact fills the entire screen. What could be wrong? I presume the problem is that UIViewController'...

presentModalViewController from UIView

Hi Everyone: I am attempting to call presentModalViewController on a UIViewController in order to bring up a Address Book "view", however I am running into a bit of a problem. The UIViewController that "controls" the app simply draws a view to the screen and then lets the view do all of the handling of user interaction, etc. But now, ...

UIView. What are the maximum bounds dimensions I can use?

Does anyone happen to know the maximum value for someView.bounds.size ? I'm creating a view hierarchy with where the accumulated bounding-box of all child views is equal to the root parent view. Cheers, Doug ...

touches in touch event handling in UIView vs UIViewControllers

So, I'm capturing multiple touches and determining the number and where each of the touches occurred and I'm seeing different behavior between a UIView UIViewController. Basically, the event handler is coded below: (in this case the touchesEnded, but it really doesn't matter). What happens in the View, is that I get the entire collect...

Is it Possible to Center Content in a UIScrollView Like Apple's Photos App?

I have been struggling with this problem for some time and there seems to be no clear answer. Please let me know if anyone has figured this out. I want to display a photo in a UIScrollView that is centered on the screen (the image may be in portrait or landscape orientation). I want to be able to zoom and pan the image only to the edg...

How set a UIView subview larger then its parent superview in IB?

Can someone please reveal the secret handshake in IB to allow a UIView subview to exceed the bounds of its parent superview? Cheers, Doug ...