I have common functionality that I need to access from all screens of my app: a right bar button item and associated action.
So as not to repeat the code I would like to set this up in a custom UIViewController and have all my view controllers inherit from it.
- (void)viewDidLoad {
UIBarButtonItem *rightBarButton = [[UIBarButtonIte...
Here is some code... I have a stream that works correctly if I view with safari on the iphone or quicktimex on the mac... but the stream doesnt view in my code for the ipad simulator
- (IBAction)clickedOpenMovie:(id)sender {
NSString *myString = [NSString stringWithFormat:@"http://myipofstreamingserver:1935/live/aStream/playlist.m3u8"...
Hi,
I'm now testing GKPeerPickerController.
I have a simple app that just have a button and do GKPeerPickerController on a device.
However, all it does is "Looking for other iPhones or iPod touches..."
I do have another device nearby with bluetooth turned on BUT without the app installed.
Does that other device also need to have the ap...
I would like to have both movies playing at once in their two separate sub views. They are both accessing different media.
this is on an ipad with a superview and two little views 320x240 right by eachother on the xib.
-(IBAction)playLeft:(id)sender{
if ([self.playerRight playbackState] == MPMoviePlaybackStatePlaying);
[self.playerRig...
I am trying to make an if statement which will check whether the users touch is within a UIButton's bounds. I thought this would be an easy affair as UIButton is a subclass of UIView, however my code doesn't seem to work.
This is the code I have been using.
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event {
NSArray *...
I am setting up an application using the MVC model and I have a query regrading the flow of information from the UI to the data model. What I need to do is place data from the UI in the model, what I have done is write a method in the view which collects the required data in an object and then passes it to the model. The model then takes...
Sometimes I need to find out if an object will really be released. I could use Instruments of course, but that takes much time, and I have to search into millions of objects, so I used to do this:
-(void)release {
NSLog(@"I'm released");
[super release];
}
But the problem is: is this safe to do? Can I get any problems when I o...
Hi,
I recently started a project, using Apple's Utility Application example project. In the example project, there's an info button that shows an instance of FlipSideView. If you know the Weather.app, you know what the button acts like.
I then changed the MainWindow.xib to contain a scrollview in the middle of the window and a page-con...
I have a struct in ClassA and want to assign it to the same struct in ClassB (the two structs are the same with different names). ClassA and ClassB are view controllers. Basically, I need to pass this struct to another class. However, structs don't seem to be exposed as members, which means I can't access them. Here is ClassA's struct...
How do I write a program for iPhone (Objective C++) that runs on OS 2.0 but takes advantage of 3.0 features if they're available?
Example: copy&paste (class UIPasteboard). Nice feature to have, but I don't want to kill backward compatibility. Do I compile against SDK v. 3 or v. 2? If the latter, how do I create an instance of UIPasteboa...
When my model changes I want to animate changes in UITableView by inserting/deleting rows. For that I need to know the ordinal of the given row (so I can construct NSIndexPath), which I find hard to do in better-than-linear time.
For example, consider that I have a list of addressbook entries which are manualy sorted by the user, i.e. t...
I am building an iPhone app, which will function similarly to many restaurant finder applications. When launched, the application will start with a view that allows a user to specify a zip code for performing a search. Alternatively, if the user has an iPhone with a GPS, the application will automatically perform a search based on their ...
I'd like to use the UIView "sucking" transition (view is "sucked" into a point) referenced here:
http://iphonedevwiki.net/index.php/UIViewAnimationState#Using_suckEffect
The method above, however, uses private APIs, which makes it next to useless for an App Store app. How can I recreate a similar effect without relying on private APIs?...
I've declared a struct in my header file like this:
typedef struct {
NSString *department;
NSString *departmentId;
} Department;
Department currentDepartment;
This struct is in a fairly simple class. I assign the struct values in viewDidLoad. Just before leaving viewDidLoad, I see the struct values are still there. After the user c...
Having trouble getting the correct bounds for my iPad application when launching it in landscape mode. I have the proper keys set in my Info.plist file, and my view controllers launch properly in landscape (and portrait, natch).
In my applicationDidFinishLaunching: method I'm calling a selector after a 3 second delay, and that method ma...
I have a very small bit of data that I would like to archive from my apps view. My question is, its far easier to save this data from the viewController, but should I really be pushing it back into my model and saving it there? BTW: I also need to do a quick load of this data when the app starts up.
...
I want to make an e-book reader iPhone app. Should I use UITextView or UIWebView to display the text? Which control is used by other e-book readers?
...
Hi !
Why wont this work?
View1 loads View2.
In view2:
- (void) goToView {
View3 *plainText = [[View3 alloc]
initWithNibName:@"View3" bundle:nil];
[self.navigationController pushViewController:plainText animated: NO];
[plainText release];
}
- (void)viewDidLoad {
[self goTo...
Just a quick memory management question if I may ... Is the code below ok, or should I be doing a retain and autorelease, I get the feeling I should. But as per the rules unarchiveObjectWithFile does not contain new, copy or alloc.
-(NSMutableArray *)loadGame {
if([[NSFileManager defaultManager] fileExistsAtPath:[self pathForFile:@"...
I'm wanting to create a view (UIControl) which blocks all input and shows a UIActivityIndicatorView while authenticating a user.
The UIActionSheet and UIAlertView both manage to add a black semi-transparent view over the top of all other views to block input and I'd like to do similar.
I've tried adding my view to the top UIWindow in t...