I want to create 10 buttons using an array. How to create it? I am using
array = [[[NSArray alloc] initWithObjects:button1, button2] retain];
But It tells Missing Sentinel in Function Call. Where, I am wrong?
...
Greetings all
Currently looking at some possible work in the mobile field and one question that I havent (yet) found an answer to is why developers that wish to market their apps to the greatest range of mobile phones would choose to code in the phones native lnauge over cross platform techs such as phonegap, titanium, rhomobile, and ot...
I've been trying for hours with all the different delegate methods to access the content of an XHR request that is automatically requested when a page is loaded.
I have used the following which has shown that WebKit is seeing the request in the first place (as the URL that's displayed is the correct one).
- (void)webView:(WebView *)sen...
Is there any way to make a UIView resign its first responder status when the user taps outside of the view bounds?
...
Hi all,
in java an enum can be declared like this
enum MyEnum {
ONE("descr for one"),
TWO("descr for two");
private String descr;
MyEnum(String descr) {
this.descr=descr;
}
public String getDescr() {return this.descr;}
}
therefore we can always call myEnumInstance.getDescr() for getting enum description. It is pos...
Hello All,
I've used the following example:
http://stackoverflow.com/questions/2670815/game-state-singleton-cocos2d-initwithencoder-always-returns-null
Instead of using a file, I use an NSData object i am getting from NSUserDefaults. It is not null, but rather have data in it that I believe is the correctly encoded data and for some ...
Hi all
Im just creating a menu for an iphone app using cocos2d CCMenuItem. Now i havent been using cocos2d that long so i may be doing this completely arse ways so hopefully someone can point me in the right direction.
CCMenuItem *mainMenuItem = [CCMenuItemImage itemFromNormalImage:@"Main Menu Up.png" selectedImage:@"Main Menu Down.png"...
Hi,
I have some doubts about SQLite...
My app uses only one table (encapsulated in a data logic class) to store small data, the connection is opened in didFinishLaunchingWithOptions and finalized in applicationWillTerminate (yes, I know that in iOS4 applicationWillTerminate is only called by iSO if necessary, but I write on database at e...
How do you rotate a UIImage 360˚ without open GL ES
...
Hey all,
I've run into an Objective-C problem that doesn't seem to make any sense to me. I am a relatively well-versed ObjC programmer and understand the whole "forward declaration" concept, but this one has me scratching my head. So here's the deal:
ClassA is a class in my Xcode project that is project-only.
ClassB is a subclass of ...
Hi
Can anyone tell me what I am doing wrong in the following few lines?
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory,NSUserDomainMask,YES);
NSString *documentsDirectory = [paths objectAtIndex:0];
documentsDirectory = [documentsDirectory stringByAppendingPathComponent:@"Immobilien.plist"];
...
I am adding a badge to my UITabBarController's UITabBar as such:
UITabBarItem *tbi = (UITabBarItem *)[stTabBarController.tabBar.items objectAtIndex:1];
tbi.badgeValue = @"2";
However, my UITabBarController is customizeable, so the index may change. How can I make sure the badge gets applied to the correct UITabBarItem?
...
I want my app to continue gracefully when the online server messes up. I tried to wrap the dangerous line in a @try block. Yet it is still crashing like so:
the method:
+ (NSArray *)findAllFor:(NSObject *)ratable {
NSString *ratingsPath = [NSString stringWithFormat:@"%@%@/%@/%@%@",
[self getRemoteSite],
[ratable getRemo...
Hi,
I'm programatically resizing my NSWindow containing an NSOpenGLView. The window resizes, the NSOpenGLView is handling the resizing fine, but the titlebar of the NSWindow turns completely white. However the buttons (minimize,...) can be clicked, also you can not see them.
Resizing occurs using the following code in the windows con...
I want a UITextField to be sent the resignFirstResponder message if it is being edited and a user touches elsewhere on the screen. Since there are several text fields I need a way to programmatically determine which one is the first responder to send it the message. How can I do this? Is there some sort of global first responder object?
...
I am writing some code to allow users to answer multiple choice questions. So I have an NSArray of values [@"value1", @"value2", ..]
I want to display them as:
A) value1
B) value2
The code I have is
for(int i = i; i < [values count]; i = i+1) {
NSString *displayValue = [[NSString alloc] initWithString:<NEED HELP HERE>];
displayValue =...
My application brings up a different view each time it is built in Xcode. This is exactly what I want it to do. However, if I simply press the back to menu button in the simulator and then reopen it the view does not change. I am changing the view by overwriting the viewDidLoad function in a Custom View Controller. Why is it that ViewDid...
I've got a UINavigationController that has a UITableViewController as it's root view. The UINavigationController is inside a UITabBarController.
In the UITableViewController (*viewOne), if I click a cell a the following code runs
UIViewController *newView = [[UIViewController alloc] initWithNibName:@"newView" bundle:nil];
[self.navig...
I have a few methods for initialization of different stuff in my class implementation. However, when I invoke these methods by using [self 'methodName'], the Xcode compiler gives me a warning that I could not get rid of.
'className' may not respond to 'methodName'
For example,
warning: 'NextJackpotViewController' may not respond to -...
Im new to obj-c and have trouble understanding the function autorelease. could someone explain to me when i should use it? and how is it different than release. also do I need to reset the autorelease pool? how? and when?
...