(or set multiple objects with one value)
Is there a way to send multiple objects one message in one line.
So like
[someObject, otherObject reset];
like in LUA scripts (which I believe is C?) you can set mutliple objects:
someThing, otherThing = 1 , 0
...
In a iphone apps, is it possible to stop the user when he want the quit the application with the home button, so, the user can't quit the application and I close the application when it's the time?
thanks
Alex
...
if (myChar == '"')
if ([myChar compare:@"\""])
if ([myChar isEqual:@"\""])
if (myChar == @"\"")
None of the comparisons above seem to work. I need to check if myChar, which is taken from an NSString, is a quotation mark.
Any ideas?
...
Is it possible to see on a NSDate whether the time part has been set or not?
Or to rephrase the question: is it possible to create a NSDate in such a way that when I look at the instance I can see whether the time was set or not?
I am having an issue where I read sometimes DATE and sometimes DATETIME from a database. In both cases I c...
Is it possible for me to listen to listen to OSX's built in screencapturing so I can handle the files myself rather than osx doing it?
...
Hi,
I set up a project using MVC (to be more specific this is Hello Poly part 2 from Stanford)
and I'm having problems referencing object.
So I have Model which is PolygonShape class, Controller - controller, and View - PolygonView.
I made outlets in Controller :
IBOutlet PolygonShape *myShape;
IBOutlet PolygonView *myView;
...
I was using an NSMutableArray and realised that using a dictionary is a lot simpler for what I am trying to achieve.
I want to save a key as an NSString and a value as an int in the dictionary. firstly , how is this done? Secondly, what is the difference between mutable and a normal dictionary?
Regards.
...
I have a custom NSTableView subclass filled with several custom NSTextFieldCell subclasses. I would like to be able to change the edited cell by using the arrow keys.
I am able to accomplish this by creating a custom field editor (by subclassing NSTextView) and returning it from the window delegate like so:
- (id) windowWillReturnField...
Hey,
i just upgraded my Project to the newest Three20 Build.
When compiling i get following errors:
Undefined symbols:
"___restore_vfp_d8_d15_regs", referenced from:
+[TTEntityTables(TTSingleton) sharedInstance] in libThree20Core.a(TTEntityTables.o)
+[TTEntityTables(TTSingleton) releaseSharedInstance] in libThree20Core.a(TTEntity...
I have the following code:
self.itemsCopy = [self.items mutableCopy];
//[self.itemsCopy addObjectsFromArray:self.items];
NSLog(@"------- BEFORE APPEND --------");
NSLog(@"items count: %d",[items count]);
NSLog(@"itemsCopy count: %d",[itemsCopy count]);
My results are:
------- BEFORE APPEND --------
items count:...
Hi all,
I can't seem to find anyone who's had a similar problem so hopefully someone on here can help me with what might be a very obvious problem.
Basically my program currently has a bunch of UISliders, UIButtons, and text boxes in it. Although I laid out all of this in landscape (I plan on having this view work only in land scape, o...
Hi,
I've been working on a application for iPad that use sockets to communicate with another application and I'm having a lot of problems figuring out how to implement a timeout when sending data to my server application.
I have like 3 command that I send to the server depending on what type of information I need, one of this commands ...
I implemented the two methods of the protocol nscoding in a view controller, but now I want to save the view when the apps close and restore the view when the apps start, how I do this?
...
I've checked Google and I haven't found anything that helps.
I'm writing a stack class in Objective-C, the stack is based around an NSMutableArray, however, I cannot add any objects to it, it's not throwing any errors in the console, and there are no compile warnings/errors. Here is my code for the stack object.
#import "Stack.h"
@imp...
when my tap gesture fires I need to send an additional argument along with it but I must be doing something really silly, what am I doing wrong here:
Here is my gesture being created and added:
UITapGestureRecognizer *tapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleTapGesture:itemSKU:)];
tapGestu...
Fellow coders,
I wrote an iPhone app that plays wma stream, using libmms and ffmpeg open source libraries. The app has already been approved by Apple and is available for download, free of charge.
Now I'd like to have a VU meter on my app.
I'm using the avTouch code sample, downloaded from Apple (https://developer.apple.com/iphone/lib...
Hello,
I have the following class:
@interface Gamer : CCNode {
NSMutableArray * cards;
}
@property (nonatomic, retain) NSMutableArray * cards;
+(id) CreatePlayer;
-(BOOL)SetCardsArr:(NSMutableArray *) cs;
-(BOOL)GetCardForMove:(Card*) card actionCard:(Card*)selCard;
@end
@implementation Gamer
@synthesize cards;
+(id) CreatePlayer
{
...
How can I determine if the user has scrolled to the last cell/bottom of a UITableView?
...
I'm having problems reading and writing to a plist file. I can read the data OK, but I cant write it.. also, I think I have a memory management issues relating to this. Here's my code:
+(NSString *) getSettingString: (NSString *)key
{
NSString *path = [[NSBundle mainBundle] bundlePath];
NSString *finalPath = [path stringByAppendingPat...
I have made a UIView which contains a table and some buttons. This view is called by a UIViewController which is called by a tab-bar controller. There is no IB involved.
When the view comes up it only has the outlines of the objects. e.g. the following button comes out without its label:
brect = CGRectMake(80, 330, 60, 27);
centern=CGP...