uiview

Detect missing 'commitAnimations'

Hi Something weird is happening to my views all of a sudden (resizing a UITableView results in strange flying header sections) and I have a feeling I'm missing a '[UIVIew commitAnimations]' somewhere in code. When I add this line into 'viewForHeaderInSection', the weird behavior stops. Question is, how can I find animation blocks with ...

How to anti-alias layers against their superviews in iOS?

Hello, I'm trying to lay out a bunch of views as shown in this photo: Each view has sublayers whose backgroundColor produces the colours you see. The problem is that when the view is rotated, the sublayer doesn't anti-alias, so these ugly white specks appear (I confirmed that they are indeed the backgroundColor of the UIView) Is the...

Custom UIView and UIViewController best practices?

I currently have a simple iPhone app that loads a custom subclass of UIView. There's only one controller at the moment for the whole application, although there are several UIViews for separating the program logically. My current structure looks something like this: mainView : UIScrollView \__ has one subView : myCustomUIView : UIV...

iPad, UIViews, and View Controllers? Something isn't working...

So I think I have my Views all messed up, and how these work. Actually, I know I do, cause I am getting this: http://www.designmenace.com/downloads/landscapeWhatWhat.png . The iPad is turned landscape and so is the view but it's not rotated properly within the window. But the top bar is rotated properly! And this only happens about 70...

[iPhone] Disabling auto rotation for a UIView

Hi ! My application is composed of a toolbar and an AVCaptureVideoPreviewLayer in a background UIView. I'd like to see that toolbar rotate regarding the device orientation, so in my main ViewController, I implemented the function : - (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { return ...

How to show and dismiss ViewControllers without the user seeing

I have several view which I show and dismiss, but it is visible when a view moves onto screen and is dismissed from the screen. How do I set it to just appear without any animation? I have tries the animation:NO, it doesnt change anything. Are there special calls for different animation types? ...

How to position view below green bar during phone call?

How do I make my view appear below the green bar during a phone call? right now my app is being partially covered by the green bar during a phone call. ...

[iPad] Scaled UIView disappears on orientation change

Hi @ all, in my iPad App i'am resizing a UIView to 60% of its original size magController.view.transform = CGAffineTransformMakeScale(SCALE_FACTOR,SCALE_FACTOR); that works fine so far but if I rotate the device the UIView gets more or less clipped. I have this issue only on the device in the simulator everything works perfect. gree...

Update UIView to ScaleFactor 2.0 for the iPhone4

I have a program running beautifully on my iPhone 4. It uses a class UIView I created (called TestView) to draw graphics using Quartz (very simply graphics such as just a few CG lines and circles). I need, however, to take advantage of the new higher resolution screen on the iPhone 4. Currently, the ensure backwards compatibility with iP...

Putting UIView with alpha 1 on top of UIView with alpha 0.5

Hello everyone, I'm trying to have a modular uiview that will be placed on top of another view. The modular view has an alpha value of 0.5, and appears in the middle of the main view. Now, I would like for text to be rendered on that modular UIView. However, whenever I: [modularView addSubview:text] it looks all hazy. How can I m...

Magnifier effect with CALayer s

Hi, I want to implement a magnifier exactly like the one is shown when an UITextView is long pressed. I got the idea from here: http://stackoverflow.com/questions/2030730/iphone-reproduce-the-magnifier-effect/2030846#2030846 But I am working only with CALayers not UIViews, hence I don't have a drawRect method to write in. I wonder whe...

What is the best way to repeat a UIView animation (with blocks) X times?

I have an animation that I'd like to repeat 5 times and then stop. Is there a way to set the repeat count with the Blocks API? My current approach is to kick off a NSTimer to trigger the animation X times. Is there a better way along the lines of setAnimationRepeatCount: ...

Dealing with drawRect multiple calls

I discovered that my drawRect is being called more than once. Unfortunately this had the unfortunate side-effect of double-drawing everything because all my subviews are drawn in drawRect (I'm s strict atheist w.r.t. Interface Builder). What is the best way to deal with a multiple calls to drawrect? A flag to check if it's being called ...

Presenting view controller modally animates slowly

I have a view that I am presenting modally. For some reason it animates very slowly. [self.parentViewController.tabBarController presentModalViewController:browser animated:TRUE]; I'm not sure why? I have even tried: [self presentModalViewController:browser animated:TRUE]; UPDATE: The UITableViewController that is presenting it, is d...

Scale Entire UIView Proportionately

I have a base UIView which takes up the entire iPhone screen when the it is horizontal. When the device is rotated to portrait, I want the view to basically just scale down itself and everything in it to 2/3 the size and center it on the screen so everything is shown: Image: http://img25.imageshack.us/img25/3281/rotateqx.jpg I can't fo...

iPhone Deck Game interface

Hello I wrote the code of a card game .. but now it's time todo the graphic and Interface What's the best approach to represent a card ?? a) CALayer b) UIView c) UIButton Which one is best to animate and receive user touches??? What do you recommend?? Thanks in advance ...

Why can't new ObjC classes descend from UIViewController?

So, I've been making iOS apps since the first iPod touch came out, but something has always flabbergasted me; why is the list of new Cocoa Touch classes restricted to subclasses of NSObject, UIView, and UITableView? I routinely make subclasses of UIImageView and UIViewController. Am I "Doing It Wrong™?" Have I totally misunderstood MVC...

Getting iPhone app to display one of two different views

I have a program where we are using a navigation controller and need the app to launch to one of two different views. Basically if certain info has previously been entered then we need the app to launch to view A, but if the info has never been entered then we need it to launch to view B. I am having difficulty getting this to work and a...

Animating UINavigationController's 'back' button

I have a custom button on a view controller in the navigation controller's heirarchy, that when pressed, pops the visible view controller. I want to use UIView's transform property to animate the closing of the view controller. It works, but if I use `popViewControllerAnimated:YES', the default left slide of the animation is still ther...

Problem during page flip

Hi all, I am using this code to flip my view. but the problem is when the flip is complete the view does not come back to its original position. I have tried to set the frame to change its position but its not working as expected. - (void) pageOpenView:(UIView *)viewToOpen duration:(NSTimeInterval)duration withFlipDirection:(NSString*)...