uiview

Transparent repaint on UIView

I'm making an iPhone-app with particles moving on a custom UIView, drawn with Core Graphics. I want my particles to leave a trace, so when the view is repainted I want it to fill the background with 0.8 alpha. Anyone knows how to do this? I've tried setting the background color of the view to something transparent in IB, but that doesn...

How can I make a custom class be displayed in MainWindow.xib?

I created a custom class that inherits from UIView and I want to display an instance on the screen. However, when I try to link the outlet from the App Delegate to the object I dragged onto the screen (which is that custom class I created) the link cannot be created. What am I missing? ...

How do I use CGContext to draw on top of an existing UIView?

I have a subclass of UIView in which I've added some subviews to in my initWithFrame method. I've added a background, amongst other things. I want to draw some shapes on top of these views (which happen to cover the entire screen). But, when I implement drawRect: to draw these shapes, they didn't show up. Upon removing the other subvie...

UIView not being positioned with setFrame

I'm probably not doing this correctly. Having not done an iPad app before I'm doing what seems natural to me. I have a UIView that is going to be made of up other UIViews. Specifically, I want to dynamically create and add subviews to each of these subviews. In other words: UIView | | --> UIView | | --> Dyna...

canceling the delegate for a specific UIView animation

I receive a crash on the call to the function set in setAnimationDidStopSelector when my view is animating as I remove the view and release the object. I'm not 100% certain that this is simply a case of a UIView animating while being released and the callback issued by the animation being called into a released object, but I suspect it ...

How do I add a touch event to a subview of UIView?

I'm trying to build by very first app so excuse my ignorance. I love the sample code that Apple put together here called ViewTransitions: http://developer.apple.com/iphone/library/samplecode/ViewTransitions/Introduction/Intro.html I want the transition to occur after a user taps the screen once instead of the button like the code does....

NavigationBar is not appearing on my ViewController

I have a UIViewController that is presented modally. The UIViewController is inside of a UINavigationController. // Implement viewDidLoad to do additional setup after loading the view, typically from a nib. - (void)viewDidLoad { [super viewDidLoad]; saveButton = [[UIBarButtonItem alloc] initWithTitle:@"Save" ...

Custom UIView does not rotate when device orientation changes

Hello, I created a UIView which has two controls on it, a label and an activity indicator (spinning wheel) to display when the device is synchronizing. As this UIViewController needs to be accessed globally I'm adding it in the app's FinishedLaunching event: window.AddSubview (navigationController.View); window.AddSubview(SyncSpinner....

NSOperation not adding subview to main view

I am running into an strange behavior when using NSOpeation. I am calling a function (-createTagView) that creates an UIButton to then add it to a view. For some reason it's not adding them. If I call the function from outside the NSOperation everything works fine. Any ideas? Thanks. This how I create the NSOperation (within a ViewCont...

Different between UIView and UIControl when drag inside UIScrollView

Hi there, I have a UIScrollView which contains some small UIView subclass. UIScrollView is scroll enabled, and I want each UIView can be dragged inside UIScrollView freely. My UIView subclass has this method: - (void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { UITouch *touch = [touches anyObject]; if ([touch vie...

Easiest way to prevent the cursor from going behind the keyboard in iPhone SDK?

Hi. I have a table with several text fields in it. Tapping on any of the text fields brings up the keyboard and the view scrolls automatically to bring the cursor above the keyboard if required. I have a method in there that gets called whenever the user presses the Return key while editing a text field and I simply move the first resp...

Mimic Dock view in iPhone app?

Hi All, In my app I want to mimic the dock as displayed in Mac.Instead of using tab bar I want to use a dock kind of view in my app so that when a user taps on a dock item a new view is displayed.Is there any code or help availble for the same? ...

iphone: Button/Image on top of TabBarController?

When in the Camera Roll section of the Photos app, you can click the top right button to edit the photos. This replaces the bottom tab bar with three new buttons. I would like to do something similar, but I cannot get my buttons to be on TOP of the tab bar. Is there a way to specify the layer order? Or do I need to do something diffe...

Key Value Bindings iPhone

I have a bunch of NSDictionaries thats stored in an NSArray. The dictionaries store coordinates for buttons, their name, and their relating object to load when pressed (UIView). When the button is pressed I can retrieve which button it is in string format, for example "settings" and I would like to then run the object -(void)settings{}....

iPhone - UIView orientation changes

I got a subclass of UIView in which I draw an NSString object using the drawInRect:withFont:lineBreakMode:alignment: method. Unfortunately, when I change the orientation of the device, say from portrait into landscape mode, the text doesn't get redrawn correctly but gets scaled and distorted against my intentions. How can I solve this ...

Can assign value to a property on property changed event ?

hI, I am working in wpf - mvvm model. I have a textbox which holds- "marketName". In xaml I am binding the property - "newmarketname"(which is defined in my viewmodel) to this textbox. Once if user enter a new market name in that text box, the "set" method of the "newmarketname" get called. In set method of the "newmarketname", I cal...

need multiple inheritance in Objective C

I want to implement a movable UIView class (view moves when you touch on it and move your finger), e.g.: @interface MovableView : UIView { some members; } -touchesBegan; -touchesMoved; @end How can I apply this code to UILabel, UIButton etc without multiple inheritance? In C++, I'd do it like this (with UIView as a virtual base to ...

UIView transitionWithView: clipping my UITextView

I have a UITextView with scrolling disabled, and I am using the page-curl transition to change the text inside. This is the code I'm using: myView.text = nextString; [UIView transitionWithView:myView duration:PAGE_CURL_DURATION options:UIViewAnimationOptionTransitionCurlDown animations:nil completion:nil]; Everything works fine, exce...

Set UIView.frame.size.height to zero to hide content?

UIView *stateView = [getSomeUIView thisOne]; CGRect currentFrame = stateView.frame; if(currentFrame.size.height == 0.0) { currentFrame.size = CGSizeMake(260, 60); } else { currentFrame.size = CGSizeMake(260, 0); } stateView.frame = currentFrame; I would expect all the subviews would be hidden when the height of the frame is set...

UIGestureRecognizer blocking table view scrolling

I'm using a custom UIGestureRecognizer subclass to track gestures on my InfoView class. The InfoView class is a subview of a custom UITableViewCell subclass called InfoCell. I've added my gesture recognizer to my root view (the parent view of everything else on screen, because the purpose of my custom gesture recognizer is to allow dra...