Creating a NSColor with RGB value
How do I create a NSColor from a RGB value? ...
How do I create a NSColor from a RGB value? ...
in fact i am building a virtual keyboard how can i send a keyboard event to the program through pressing a button? thanks ...
Would it be in the .h or .m and how do I do this? ...
Howdy, I am trying to generate keyboard keydown and keyup events programmatically. I am currently using CGPostKeyboardEvent to do this, but I am searching for a way to do this at a lower level. I have looked at DDHidLib but could not figure out a way to create a fake event. Can anyone help? update: Thanks to weichsel's advice I am...
Here's my code: @interface Game : Layer // this is from cocos2d { int maxSprites; } @implementation Game -(void)initVariables { maxSprites = 18; } Later on, when I print it out, NSLog(@" maxSprites = %d ", maxSprites); I get: maxSprites = 2 And operations that require it to be 18, crash or don't work, as if it's really ...
Hi, I am a software engineer concentrating on iphone application development and I own a developer license. Currently I am working on a project where i need to maintain a local database in iphone. Each time the application launches , the application should sync data from a remote server. The application should add/update/delete the local...
Is there an API or something similar for interacting with Safari on the iPhone? For instance, is it possible to create or read bookmarks? ...
My code for my NSTextFieldCell is: - (void)drawInteriorWithFrame:(NSRect)cellFrame inView:(NSView *)controlView { // Drawing code here. NSGradient *gradient = [[NSGradient alloc] initWithStartingColor:[NSColor lightGrayColor] endingColor:[NSColor grayColor]]; [gradient drawInRect:cellFrame angle:90]; [[self title] drawIn...
Hi all, I am getting this parser error while accessing the server url Parser Error : Error Domain=NSXMLParserErrorDomain Code=5 "Operation could not be completed. (NSXMLParserErrorDomain error 5.)" What does this mean ? Thanks ...
I have a array of NSString objects which I have to sort by descending. Since I did not find any API to sort the array in descending order I approached by following way. I wrote a category for NSString as listed bellow. (NSComparisonResult)CompareDescending:(NSString *)aString { NSComparisonResult returnResult = NSOrderedSame; r...
I'd like to be able to debug my application in the iPhone emulator. The app uses the Media Library Framework so I'm not really sure whether I'm able to add songs to the emulator and actually try out the app there. Is this possible? Right now I'm just using the iPod directly for this... Thanks, rui ...
I am a complete newbie working on my first iPhone project. I have been a .NET developer for 4 years to give you some background on where I am coming from. I am trying to follow the MVC pattern and do things the right way on my first project. I don't want to hack things together just to get them to work. Here is my situation: I am trying...
Is it possible to draw in other processes windows on MacOSX using Cocoa or other libraries? If yes, are there any samples? Alternatively a quick summary of what i'd have to do? (I need to support at least OSX 10.5) Shared memory is of course a possible solution, but i'd prefer direct drawing to avoid synchronization overhead and code ...
Hello, I got stuck while adding records to contacts of iphone. Situation is this I have a view in which contacts are created and inserted to contacts of iphone. What I want is Is there a way to find some unique ID of the (record) contact which is inserted. Which will be required to access the contacts in some other view. Please en...
Hi All, I have an iPhone app and I want to get a list of co-ords that are clickable by a user. I want to automate testing and have a client app click around on screen but just choosing random coords isn't ideal so a list of coords that are definitely clickable would be much better. So far I have this the view passed in is top level wind...
Hello I want the keyboad show automatically onload, but it did not work as i expect here is the code i use: - (void)viewDidLoad { [super viewDidLoad]; [seachBar2 setDelegate:self]; } - (BOOL)Searchbar2ShouldReturn:(UISearchBar *)searchBar2 { [searchBar2 becomeFirstResponder]; return YES; } Coud somebody will poi...
I'm doing the fourth assignment on the Stanford Iphone Dev Course. - (void)applicationDidFinishLaunching:(UIApplication *)application { // Override point for customization after application launch [window addSubview:[navigationController view]]; [window makeKeyAndVisible]; ListViewController *listview = [[ListViewC...
In my application I am executing 10 asynchronous NSURLConnections within an NSOperationQueue as NSInvocationOperations. In order to prevent each operation from returning before the connection has had a chance to finish I call CFRunLoopRun() as seen here: - (void)connectInBackground:(NSURLRequest*)URLRequest { TTURLConnection* connecti...
Objective-C: I need help retaining the value of an int. It's changing on me without my command. The original question was: "How do you declare and retain an int?", that was satisfied in another post here: http://stackoverflow.com/questions/1938513 Now I have a problem where an int that was 18 is changing to 2, somehow on its own. Her...
Hi - I open a window with the following: NSRect screenRect = [[NSScreen mainScreen] frame]; [super initWithContentRect:screenRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; int windowLevel = CGShieldingWindowLevel(); [self setLevel:windowLevel]; ......