I was getting a little confused with typedef/enum until I realised that I did not need to name the emun. Are there any differences / benefits between these two when used with typedef, the 2nd one to me seems a lot easier to understand.
First Example:
typedef enum enumMenuItems {
none,
add,
save,
load,
list,
remo...
Greetings,
I'd like to convert a PointPoint file to PDF using C/Objective-C (bonus points if you suggest a solution that could run on an iPhone directly).
There are a number of Java libraries to work with MSFT files (odftoolkit, apache poi), but I'd really like to perform this operation on an iPhone device.
Apple has built in libraries...
I'm creating an app in which I do the same thing multiple times. I'm going for as little code as possible and I don't want to repeat myself.
I need the PHP equivalant of a reusable function, where I set an input, and the function will return the output.
The app is a URL shortener, so the input as you may assume is a URL, and the outpu...
I've read that as of iPhone OS 3.1, GameKit supports wifi connections. But the documentation states:
"If your application configures the
peer picker to allow Internet
connections, your application must
also dismiss the peer picker and
present its own interface to configure
an internet connection."
Does this still stand? ...
When using property/synthesize for a UITableView, UIButton, etc should self be included in the method call on that variable? Using UITableView as an example is there a difference between [self.myTableView visibleCells] and [myTableView visibleCells]? Or say [self.myImage setImage:...] and [myImage setImage:...]?
I've seen Apple code tha...
I have a subclassed NSTextField to limit the maximum length (only 1 character). Now, once the user finishes entering this one character I would like to move the focus to the next NSSTextView. This is where I need some help. How can I tell the application "move the focus to the next field"? I suppose I need to call the parent view from th...
Hi guys,
I want to create native Mac OS X application using Cocoa + Objective C but I need to connect to proprietary data source, and for this, owner of the data source only provides Java library. So I need to somehow import this Java library into my project and call functions on its Java classes.(Or create java wrapper around this libra...
Hello, I am a objective-c newbe and am wondering how to run a shell script in objective-c easiest way possible. I don't care about any of the output. I have tried system(), exec() and execl() and an NSTask. Those methods don't work for some reason... This is the shell script I am trying to run:
"mount_webdav http://idisk.mac.com/idi...
I am using @property(nonatomic, retain) for my IBOutlets for an iPhone application. However, I'm not sure how to make sure I'm managing memory with them properly. The IBOutlets are all set up in Interface Builder, so I'm never calling alloc manually. This means that I'm not sure when and if to deallocate them or when to set them to point...
Hello all,
I am attempting to show an alert view as soon as the view appears (without using a button). In viewcontroller.m I have:
- (void) viewWillAppear:(BOOL)animated
{
UIAlertView *alert = [[UIAlertView alloc]
initWithTitle: @"User Information" message: @"Hello"
delegate: self cancelButtonTitle:nil otherButtonTitles:...
I submitted my app a little over a week ago and got the dreaded rejection email today. It reads as follows:
Dear -----------,
Thank you for submitting --------- to the App Store. Unfortunately it cannot be added to the App Store because it is using a private API. Use of non-public APIs, which as outlined in the iPhone Develope...
What is the advantage of using something like NSInteger instead of int in code? I see this in examples a lot, including Apple's official code samples.
...
I have a class that I use to setup objects in an array. In this class I have a custom "initWithDictionary", where I parse a JSON dictionary. However, as I am running into NSNull, this crashes my app. To get around this, I set up a class that handles exceptions, so when a string is NSNull, it's replace it with @"". or -1 for integers.
Th...
Hi,
I'm trying to create and draw a UITableView populated by an array. I've created a UIViewController and set the UIViewController as my tableview's delegate. However, it seems that my cellForRowAtIndexPath method is not called when the tableview is created, so my table never gets populated. What am I missing here? (All labels are init...
This is a snippet of some code that I've been having problems with. I have an iPhone app that works fine for 99% of my users, but for maybe 1%, I have this bug which I can't resolve or reproduce on my end. The app just freezes for them, and doesn't actually crash (so no crash reports). Some ad-hoc distribution testing has revealed the pr...
Hi everyone, I am junior in iPhone game development. I am using Cocos2D for this game I am currently building. I have completed the game however my client wants to have 1 more version of this game, all the functionality is the same except the language. He wants the game will be switched to the French version if the iPhone language is set...
I have a TabBar bases application, which supports Landscape orientation only for one special view (the rootview of a UINaviagtionController). Now i want to force portrait orientation for all other views for this navigationcontroller.
I have tried to use
[[UIDevice currentDevice] setOrientation:UIDeviceOrientationPortrait];
This works g...
Hello all,
I want to use push notification in my app so first time it launches it will automatically ask for notification.So i want to enable-disable push notification settings for my app programmatically.Note-I do not want to unregistered my app just disable Alert,badge,Sound for my app in settings app.
...
How would I go about programming a HUD type overlay in OSX.
I want to be able to have an application that will display text at a certain point over a different application's window.
And thus if the (other applications) window moves the HUD part will stay at the same coordinate of the other window.
...
how to scroll view and scroll view will disappear. i am write this code but this is not scroll disappear
-(void)viewWillAppear:(BOOL)animated
{
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(keyboardWillShow:) name:UIKeyboardWillShowNotification object:self.view.window];
[super viewWillAppear:animated]...