I have an application I'm writing, in Objective-C(iPhone), and I want to be able to write a string of text to Pastie or Pastebin, and be able to have the link to that page. I have not been able to find any API for either of these, is this possible? How?
Thanks!
...
Does anybody know of a way to customize the appearance of the string based UISegmentedControl? I am trying to set the background color of the cell and the text color differently depending on the selected state of the item.
Alternatively, do you know of a way to create UIImages on the fly in which to include custom strings? (e.g. create...
Dear all: In advance, thank you for your time.
Lately, I have decided to learn Objective-C (I am a long time C-hacker) and after reading the beautiful text by Kochan and diving into the Apple documentation I am still confused as to the best way to implement a recursive class (ie. a class in which an ivar has the type of
the same class)...
I'd like to use reliable locations, even on an old iphone. However, many readings (particularly from cell towers) are too inaccurate. I think.
When I plot my position + accuracy radius (or look at google maps app), I notice the center of the estimated circle is generally close to my physical location. I'm guessing that if I cut the "...
% sudo dtrace -p 2446 'objc$target:NSObject:-init:entry { trace(); }'
dtrace: no probes specified
The manpage suggests that this is the correct format with which to specify a probe on an Objective-C method. I tried -Z, but (unsurprisingly) that just didn't print anything.
[Added] It's not even specific to Objective-C probes. I tried i...
I don't want my app to go to sleep (shut screen off) unless the user puts it out of its misery. I'm trying what I think is simple code:
- (void)applicationDidFinishLaunching:(UIApplication *)application {
application.idleTimerDisabled = YES;
This works most of the time, but the app still occasionally goes to sleep. I'm not sur...
I'm working on an app for jailbroken iPhones. I'm trying to get only the directories of an folder. so I'm doing this:
NSArray *contentOfFolder = [[NSFileManager defaultManager] directoryContentsAtPath:path];
NSLog(@"contentOfFolder: %@", contentOfFolder);
directoriesOfFolder = [[NSMutableArray alloc] initWithCapacity:100];
for (NSStrin...
Hello, can you give me a hint how to customize such a contact picker from e.g. Mail or Facebook App with the (+) Adding Contacts (or other data) to a UITextField for recipients .. each of the entries can be deleted then with the (x) ..
can you give me a hint where to start and what i should customize? thank you
...
Hi,
When I load a specific web page using UIWebView in my iPhone app, it crashes with a mach_msg_trap error. Other websites load fine in my app.
Try this URL as an example:
[rssArticle loadRequest:[NSURLRequest requestWithURL:[NSURL URLWithString:@"http://www.fan-f1.com/actualite-8387-F1-Massa-pourrait-quitter-lhopital-de-Budapest-dans...
I searched the site but did not find exactly what I was looking for... I wanted to generate a discrete random number from normal distribution.
For example, if I have a range from a minimum of 4 and a maximum of 10 and an average of 7. What code or function call ( Objective C preferred ) would I need to return a number in that range. ...
I have a list of several hundred locations and only want to display an MKPinAnnotation for those locations currently on the screen. The screen starts with the user's current location with a 2 mile radius. Of course, the user can scroll, and zoom on the screen. Right now, I wait for a map update event, and then loop through my location...
I have a UIBarButtonItem opening an action sheet to offer users choices about what to do. Everything works as expected unless I try to click on the "Cancel" button. The target of the button appears to have moved up from where it should be. I can only activate it by clicking somewhere in the middle of the "Cancel" and "Ok" buttons.
I'...
I downloaded MGTwitterEngine and added to my iPhone project. It's connecting and getting statues I can tell from dumping them into an NSLog. But, I can't figure out how how I need to parse the calls so I can add them to a table. They are returned as an NSString and look like this:
{
"created_at" = 2009-07-25 15:28:41 -0500;
...
here is the code: http://pastie.org/562956
this code crashes on the call to itemsArray.count on "didSelectRowAtIndexPath". I don't get why... itemsArray is accessed for other methods like "numberOfRowsInSection". why would it all of a sudden get dereferenced ( I assume that is what is happening).
here is the output (dunno what's up...
My program:
typedef struct objc_class {
struct objc_class *isa;
struct objc_class *super_class;
char *name;
long version;
long info;
long instance_size;
void *ivars;
void *methodLists;
void *cache;
void *protocols;
} *Class;
struct objc_object {
Class isa;
};
/* Code to extract the class name from arg0 based on a snippet by ...
I have a segmented control being used as a toggle. When toggled, I switch a bunch of contents around in a table view which takes a tiny but noticeable amount of time (inserting/deleting sections in the table view, animating the change, etc). I want the segmented control to respond to the selection immediately. So in my action handlin...
My understanding of IBOutlets is that they act as a marker to ivars and properties in Objective-C classes. Is there anything in the Objective-C runtime that would allow one to query whether an ivar or property or a class has been marked with an IBOutlet at runtime? Or does XCode just do something clever with these at compile time?
If th...
I have an outline view and a button. I want the button to remove the selected row in the outline view. I have bidden the Outline View's Selection Index Paths to the Tree Controller ,connected the button to the Tree Controller's 'remove:' connection and bidden the button to the 'canRemove:' property of the Tree Controller. But once I have...
Hi,
I'm working on an app that displays certain information on the status menu, and I was wondering if there's any Cocoa API that can make my NSStatusItem always placed on the most-left, no matter when it's started or if other apps are started after it.
NSStatusBar *bar = [NSStatusBar systemStatusBar];
barItem = [[bar statusItemWithLen...
I have a viewcontroller which can't be released since it is a subclass with extra functionality... Anyway there are many of them, and I need the views to be released when they go offscreen.
removeFromSuperView vanishes the views but they remain in memory. The only way I can get rid of the view from memory is to completely dealloc it. ...