cocoa-touch

How to set scope in UISearchBar

I have a UISearchBar which is working fine, but I was wondering how I can set a scope and filter results based on certain criteria like: "Dogs and "Cats" Tutorials and example code welcome. ...

iPhone: 'Linking' between two sub-view controllers

Here's my view controller hierarchy: | [A] | ---- [A1] | ---- [A2] One accesses view controllers A1 and A2 by tapping A1 and A2 cells respectively within view controller A. Say I have tapped through to A1, and within that view controller I press a button which brings me straight through to A2, how do I: Remove A1 as the visible vie...

Playing videos works on iPhone 4 but not on iPhone 3G

I am using the MPMoviePlayerController to play movies: STVideo *mySTVideo; mySTVideo = [items objectAtIndex:indexPath.row]; moviePlayerViewController = [[MPMoviePlayerViewController alloc] initWithContentURL:[NSURL URLWithString:mySTVideo.video_url]]; moviePlayerViewController.view.backgroundColor = [[UIColor alloc] initWi...

Referencing AVCaptureSession won't build project in simulator

I reference AVCaptureSession an consequently the project will only build for the device. However, I still want to test the rest my app on the simulator as I develop. Do I have to comment out all AVCaptureSession references or is there another way to build for the simulator successfully? ...

How to disable UISearchDisplayController History

I don't want to show a history when the user starts typing into my UISearchBar. How can I tell the UISearchDisplayController not to show previous search results? ...

UINavigationBar with Category, Act as Button too.

Hi there, in my iphone app, im trying to make my uinavigationbar act as a button, i mean do something when i touch it. Not back button o any nav item, the bar itself. heres how i "categorized" it: @implementation UINavigationBar (UINavigationBarCategory) - (void)drawRect:(CGRect)rect { UIColor *color = [UIColor blackColor]; UIIm...

IPhone App Settings: Settings.bundle vs plist file?

Hi, I'm a bit confused. I'd like to implement some simple settings for my app. I was thinking of just creating a simple plist file. But now I see that there's something called "Settings.bundle" (that also has a plist in there but some other stuff too). What I'm wondering, which one should I use? (I'm looking for the easiest way) Than...

Can't connect IBOutlets in XCode Tab Bar Application

I started with a Tab Bar Application. I deleted the SecondViewController.xib and in Interface Builder I deleted the associated tab bar button. Then in XCode I created a SecondViewController and a ThirdViewController. I added two tab bar buttons in IB and made these view controllers the file owners for their respective buttons. Then in th...

Is the app delegate class needed? (design suggestion)

Hi all I am not clear about the need to create an app delegate class, instead of adding the delegate methods in the viewcontroller directly. Is there any reason why someone want to have a separate delegate class? Style preference? Design constrains? (I am following the MVC model, as Xcode users and app makers do). I am asking since i ...

OpenFlow AFItem UIImageView touchesBegan

Hi There, I'm trying to use the OpenFlow project inside of my application. My target is; when the user tab to any flow item which currently UIImageView according to OpenFlow's AFItemView, it will be zoom-in in the screen (with/without animation) and then user will be able to close and get back to cower flow view in the app. I didn't ge...

UINavigationController won't show UINavigationBar

Hi. I'm trying to setup a UINavigationController in IB with a UIViewController within it. Although I have set my controller to show a navigation bar, I only see the rest of my view when loaded (no navigation bar). Has anyone else had a similar problem? Thanks. Ricky. ...

How to show No Results screen on UISearchDisplayController?

How can I manually show No Results on a UISearchDisplayController? ...

iPad - how should I distribute offline web content for use by a UIWebView in application?

I'm building an application that needs to download web content for offline viewing on an iPad. At present I'm loading some web content from the web for test purposes and displaying this with a UIWebView. Implementing that was simple enough. Now I need to make some modifications to support offline content. Eventually that offline content ...

Add a subview without waiting until the next frame.

I'm trying to create a loading view that is displayed when code is being called. Right now when I call to add a subview it isn't added until the rest of the method has been run through. For example, - (void)loadFight:(NSString*)levelName { [self createLoadingView]; sumoController = [[sumoViewController alloc] initWithNibName:@"s...

UIVIew animation - Scaling + Translating

Hi, I have a view which I want to be scaled and translated to a new location by animating it. I tried to achieve it with the following code: [UIView beginAnimations:nil context:nil]; [UIView setAnimationDuration:kDurationForFullScreenAnimation]; [[self animatingView] setFrame:finalRect]; [UIView commitAnimations]; The effect of this ...

Example code for linking an iPhone app to the Address Book (using UnknownPersonViewController)

We are wanting to implement the UnknownPersonViewController. Want to achieve the following: Make a new person object. Set a few values for the person that we know already (First Name, Last Name, Email etc) wire the person the the view controllers displayedPerson Push the UnknownPersonViewController Interact with it Save the relevant ...

create .ipa for jailbroken devices?

I just finished my first iphone application and after i build i got .app file in build folder How can I create an IPA file ,that jailbroken devices can install it easy? i Create a folder named Payload then i Copy Myapp.app into the Payload directory...Compress the Payload directory and rename the zip file to Myapp.ipa but when i want to...

Constant in objective-c

Hi everyone, I would like to add some constant keys for my application, these constant can be accessed anywhere in program. So I declare constant in interface file: #import <UIKit/UIKit.h> NSString * MIN_INTERVAL_KEY = @"MIN_INTERVAL_KEY"; NSString * MAX_TOBACCO_KEY = @"MAX_TOBACCO_KEY"; NSString * ICON_BADGE = @"ICON_BADGE"; @interfa...

What is the best method for creating a layer to catch touch events?

I need to put up an info screen above the main interface, but I need it to be alpha'd so you can see the interface underneath it. However, when I touch across the screen, the interface underneath is still running. What is the best method for intercepting the touch events so they don't pass through? I tried to add a custom UIButton the s...

Tab Bar shows in simulator but not in Interface Builder

On my desktop when I create a Tab Bar application Interface Builder is not displaying it. On my laptop this is not the case. The problem is kind of hard to explain so I made a video and posted it here. http://www.youtube.com/watch?v=JO60BcPgWqk Does anyone know if this behavior is normal? ...