I'm really scratching my head on this one:
I have an object (MyObject) which I instantiate, and this object has an NSArray member variable.
The following simple code working in the sim:
MyObject *myObj = [[MyObject alloc] init];
NSArray *arr = [myObj myMemberArray];
When I hover over myObj in XCode the tooltip reads "MyObject". Good...
I'm possibly writing a plugin system for a Cocoa application (Mac, not iPhone).
A common approach is the make each plugin a bundle, then inject the bundle into the main application. I'm concerned with the security implications of doing this, as the bundle will have complete access to the Objective-C runtime. I am especially concerned w...
My application gets handed an NSString containing an unsigned int. NSString doesn't have an [myString unsignedIntegerValue]; method. I'd like to be able to take the value out of the string without mangling it, and then place it inside an NSNumber. I'm trying to do it like so:
NSString *myUnsignedIntString = [self someMethodReturn...
Okay, I am going to try to make this totally not a "plz send teh codez kthxbai"
I am considering an app which takes sound (eventually an audio track) and applies an audio filter to it.
So I can play sounds with AudioServicesPlaySystemSound via AudioToolbox framework just fine.
What I need is a very simple example of how I might take ...
Hi,
I have a iPhone application with a few custom-defined colors for my theme. Since these colors will be fixed for my UI, I would like to define the colors in a class to be included (Constants.h and Constants.m). How do I do that? (Simply defining them does not work because UIColors are mutable, and would cause errors - Initalizer not ...
I am having an odd problem when searching a UITableView using a UISearchDisplayController. The UITableViewController is a subclass of another UITableViewController with a working didSelectRowAtIndexPath method. Without searching the controller handles selections fine, sending the superclass a didSelectRowAtIndexPath call, but if I select...
Hi guys,
I was wondering if there were any libraries out there to allow Mac desktop developers on Objective-C to create shareware applications, similar to sharify for Air. Perhaps through use of Paypal etc.
...
I have this code that simple returns Today's date as a string formatted:
+(NSString*) getTodayString_YYYY_MM_DD {
NSDate * today = [NSDate date];
NSDateFormatter *formatter = [[NSDateFormatter alloc] init];
[formatter setDateFormat:@"yyyy-MM-dd"];
return [[formatter stringFromDate:today] autorelease];
}
With instrument...
this is my xml document,
i want to use the value of id and mlsid in in my
viewcontroller.
how can i read it.
<Table>
<ID>1</ID>
<MLSID>70980420</MLSID>
<STREET_NO>776</STREET_NO>
<STREET_NAME>Boylston</STREET_NAME>
<AreaName>Back Bay</AreaName
<Table>
i have created...
I have an NSTextField that I would like to enable "as-you-type" spell checking. When I load my application I can do this from the Menu Bar > Edit > Spelling and Grammar > Check Spelling While Typing.
I would like this option to be enabled by default. Within IB I can enable this for a NSTextView but I would like to use NSTextField for ...
EDIT - not getting much input on this so here's the skinny. I'm posting keyboard events to a PSN. I then switch to another window, post some more events (this time tat session level) and switch back to the first window. When I start posting to the PSN again, nothing happens. Until I move the mouse or scroll wheel. Why would this be ...
Is there a way to catch global "crashing" app exceptions like objc_exception_throw, EXC_ARITHMETIC etc. in code? I need that because I want to do some things before the app gets killed by the system.
...
How to use performSelector:onThread:withObject:waitUntilDone:? here in onthread i have to use other thread not main thread. How to create other thread? give me some sample code.
...
Check it:
- (IBAction)toggleFavorite {
DataManager *data = [DataManager sharedDataManager];
NSMutableSet *favorites = data.favorites;
if (thisEvent.isFavorite == YES) {
NSLog(@"Toggling off");
thisEvent.isFavorite = NO;
[favorites removeObject:thisEvent.guid];
[favoriteIcon setImage:[UIImage ...
I have a UITextView and I would like to only allow it to be scrollable horizontally only.
Basically when the UITextView word-wraps I want the user to have to scroll horizontally to be able to view the rest of the contents.
...
I have a UIView that I want to load when the user clicks a button. There happens to be some data processing that happens as well after I call addSubview that involves parsing an XML file retrieved from the web. The problem is the view doesn't show up until after the data processing even if addSuview is called first. I think I'm missing s...
In the iPod app, there's a right-facing navigation button as well as the usual left-facing "Back" button. It gets you back to the "Now Playing" screen. Is this a custom button, or is there a way to easily create one using standard tools?
...
i want to block the main thread until something else is done in the background.
i used:
result=[self performSelectorInBackground:@selector(calculate:) withObject:expression];
just bellow this line I am using result:
[self use:result];
i dont want to use result until it is available.
to achieve this I implemented
-calculate:
{...
Hello
I am using avaudioplayer in my application and my all songs are overlapping(when i back on the list without stoping playing song then if i play another song then songs are playing simulteneously)
i think if i assign audioplayerDidfinishPlaying is successfull then its shortouted.
but how i implement this and if any other solutions...
My problem is this: I can't seem to access the variable todaysDate from the numberForPlot or numberOfRecordsForPlot functions (see below for numberForPlot), but I can from anywhere else in the file.
The NSLog in the viewDidLoad works perfectly, the date is set correctly. If I access the variable from my own class functions, then that's...