uiview

Why isn't my UIButton responding to touches?

I'm sure I'm overlooking the obvious as I've got countless working buttons...but...for whatever reason this one is not cooperating... I've added a UIButton (Rounded Rect) to a UIView subclass (DialogView) which is a subview of my view controller's view. This subview is created almost entirely in IB. I've wired up the button to (IBAction...

Get a image from a uiview

Hi I want to perform a shrink animation on a UITableVIew. I experimented a bit and found out that the animation runs much faster when I shrink a UIImageView with an image of the current state of the tableview instead of shrinking the table view itself. I grabbed the image in a method in my main viewcontroller prior to the animation: UI...

[iphone] How to build a "virtual zippo" app?

Hey guys, You probably all know the famous virtual zippo app. I thought of making such an app too, just for learning objective-c. THe developer said he has used a video of flame. How is it possible to play a video inside a UIView? DO you have any ideas of how to achieving that? Thanks in advance! ...

view hierarchy refresh timing

I'm trying to add a progress meter, or other "I'm busy right now" notification to my view hierarchy right before doing some intense computation that will block the UI. My code looks some thing like: //create view [currentTopView addSubView:imBusyView]; //some initialization for the intense computation [computation startComputing]; U...

iPhone SDK: repeat subviews

I have one UIView, which I'm using as my main view, and I want to repeat the subview across the screen. How exactly can I do this? ...

Calling another view from within a view class

i may be making more out of this because of the late hour. i am confused. i have multiple views i call from a viewcontroller class. typically they are called with a uibutton object. say i have two views. main and child view. here is how i would call the child while the main view is visible. [self presentModalViewController:childVie...

How to use a UIPicker to open to a new UIView??

How can i do this I want to take a UPicker and when tapped it opens up a xib/UIView can somebody please help me out with this im going crazy here LOL ...

iPhone + clear all UI Controls from View

Hi, I have a view in which I have few labels and I want to dynamically clear the view (remove all the labels) at certain condition in my application. Please help me Regards, Pratik ...

Makeing view resize to its parent when added with addSubview.

Hy i'm having problem when using addSubview. Example code: ParentView *myParentView = [[ParentView alloc] initWithNibName:@"ParentView " bundle:nil]; ChildeView *myChildeView = [[ChildeView alloc] initWithNibName:@"ChildeView" bundle:nil]; //... parent frame resized with setFrame lets say to x:0, y:0, W:320, H:411 [[myParentView view...

Why does rotation of iPhone cause crash when _existingView message is sent to deallocated object?

I have two view controllers: MyParentViewController and MyChildViewController. The application starts with MyParent. I push the MyChild controller to the top of the navigation stack, so that the chain is like so: MyParent > MyChild I log the object ID of MyChild with NSLog(@"%p", self): 2009-11-20 05:08:29.305 MyApp[2213:207] MyChil...

Are multiple UIView animation callbacks a bad idea (i.e. cause mem issues)?

I have multiple UIView animations running in my app. They are very short, and then make callbacks to a method that then usually fires off another animation. This leads to a lot of little animations running at the same time, each firing back callbacks. This actually performs pretty well, and for the first few levels (the app is a game)...

unwanted UIImageView resizing when in a UIView

I'm programatically creating a custom section header for a table that has a width set to 290. When I use a UIImageView containing a 290 x 29 PNG directly the image appears correctly. However, I'm refactoring to include a UILabel so I can do some custom text so I place the UIImageView and UILabel in a UIView. When I view this version, ...

Converting an UIview unto UIimage causing memory leak

Hi guys!! I'm developing an app for iPhone using a coverFlow view, when the app is building the cards it is using a UIView in order to add labels and other stuff. Then I convert the UIView into UIImage using the following code: UIGraphicsBeginImageContext(imageView.bounds.size); [imageView.layer renderInContext:UIGraphicsGetCurrentCon...

UIView getting disabled

I have a UIView that's starting about 600 pt's off the screen, but when it comes on to the actual frame, it seems to be disabled. I've tried using a UIScrollView, but also can't because I need to access the touchesBegan and touchesMoved methods form my UIView, so how would I enable interaction after it comes back on to the screen. And...

iPhone view is 3/4 grey, could be rotated incorrectly

Hello, This problem has just come up when I cleaned all targets and soft resetted (held home & power for about 10 seconds) my iPod Touch (2nd gen). It looks like the view might be rotated portrait. Here is a pic of the problem: The view is linked to a XIB file, and I setup landscape in interface builder. I also use <key>UIInterface...

UIView isn't released. Calling delegate with self, and using UIView commitAnimations adds retain count

I have a view that is added as a subview in a viewcontroller. The subview has delegates methods and the viewcontroller is assinged as its delegate. The subview has a animation and calls a delegate method when the animation is finished. The problem is that when the viewcontroller is removed from the view by the navigationcontroller the s...

Drawing incrementally in a UIView (iPhone)

As far as I have understood so far, every time I draw something in the drawRect: of a UIView, the whole context is erased and then redrawn. So I have to do something like this to draw a series of dots: Method A: drawing everything on every call - (void)drawRect:(CGRect)rect { CGContextRef context = UIGraphicsGetCurrentContext();...

UIView that takes you to anchor link

I'm developing an iPhone app where I have my HTML content loaded in a UIWebview as a HTMLString and would like to have a UIView that tells the UIWebview to scroll to an anchor link. Can I scroll to the anchor link from the already loaded HTML content or I would have to reload the page with the anchor link in the URL? thanks, fbr ...

UIImageView: Rotated and Scaled. How do I save the results ??

Hi All, I am trying to save a rotated and scaled UIImageView as an UIImage in the position and with the zoom scale that the user edited too. But I can only manage to save the original image as it was before editing. How can I save the image as it is shown in the UIImageView with the same scaling and rotation? I have read that I need to u...

"Swapping" a UIView Instance variable - cannot dealloc "previous" view

I want to organize somehow my iPhone game's level-views, but I simply cannot (without expanding Object Allocations). I made a really "skeleton" of my code (this game has 2 levels, the goal is to release the iPhone display). I just cannot dealloc the previous level, so Instrunments shows incrementing BGTangramLevel instances. Please, tak...