Hello,
I am developping an objective c application and I would like to detect non responsives windows even if they are not own by my application.
Is there a way to be notified when a such case occurs?
Thanks in advance for your help,
Regards,
...
I'm trying to declare a variable inside an if statement. If the result of a query is YES then the object will be of one type, otherwise it will be of another type. A bit like this...
if (YES) {
ObjectTypeA *object = [[ObjectTypeA] alloc] init];
}
else {
ObjectTypeB *object = [[ObjectTypeB] alloc] init];
}
Once that's ...
I couldn't find this method in the UITableView delegate documentation....can you tell me where I would look for the documentation for this method?
- (void)tableView:(UITableView *)tableView commitEditingStyle:(UITableViewCellEditingStyle)editingStyle forRowAtIndexPath:(NSIndexPath *)indexPath
Thanks!
...
Hi, I'm using an NSTimer to animate an array of objects across the screen. Currently they move from left to right. However, I would like them to move in a circular fashion instead. How can I do this?
scrollItems = [NSTimer scheduledTimerWithTimeInterval:1.0/30.0
target:self
...
I am saving a cookie value and then trying to send it back with a later request to use for authentication... it doesn't seem to be working.
NSString *savedCookie = [savedData objectForKey:@"savedLoginCookie"];
NSMutableURLRequest *requestObj = [NSMutableURLRequest requestWithURL:[NSURL URLWithString:urlAddress]];
[requestObj addVa...
Hi, am having some trouble with attempting to remove a memory leak from my code. In the code below, I get a memory leak on the line "configurationArray = [[NSArray arrayWithContentsOfFile:controllerConfigurationFilePath] retain];" however when I remove the retain, the application crashes and changing the retain to an autorelease also cau...
I'm trying to use a UIImage as a button which gives the impression of it being turned on then off again within about half a second. This works fine if I switch it on but if I want to switch it off again it doesn't switch on at all. I have a short loop in there to prevent it switching on and off so fast I can't see it but it doesn't switc...
Hi,
I load my xib files through: initWithNibName programatically. If I set something like: [[LoginController alloc] initWithNibName:@"LoginController" bundle:nil];
Shouldn't it load LoginController.xib if it is executed on iPhone and search for LoginController-iPad.xib on the iPad? This is not happening at my code, do I have to select ...
Hi everyone,
I am trying to develop an email-sending app which sends messages via custom API. The problem is that UITextView does not allow to display html content, and in order to forward/reply messages properly you sometimes need to edit an html-content that came from a previous message. However in a standard Mail.app on iPhone the ...
Drawing/painting should always be done on the GUI thread otherwise deadlocks can occur!...
How do you determine if a call may cause unsafe painting off of the main thread for iOS?
The problem is we get stacks like this which are not on the main thread...
#19 0x02a788d2 in -[CALayer drawInContext:]
#20 0x02a784b0 in backing_callback
#2...
Hi,
which is the cleanest way to use something like a global variable? Normally, using a global variable is forbidden, but I don't know a better solution for accessing NSUserDefaults from different classes.
I read a bit and come up with this. I define a Contants.h and a Constants.m file and include them everywhere I need to.
//Consta...
Should I release strPhone? What about the coreFoundation object being cast to an NSString? What happens to it?
strPhone = [[NSString alloc] initWithUTF8String: [[(NSArray *)ABMultiValueCopyArrayOfAllValues(theProperty) objectAtIndex:identifier] UTF8String]];
Thanks for helping me understand.
...
What does mean? I get this error when trying to iterate through a file in Cocoa obj-c.
I can't find any information on the web.
Would appreciate some help. Thanks.
EDIT
I've been following this tutorial (link) to preload Core Data. I've tried creating a Cococa application and have also tried doing this from within my iPhone app. I ...
EVERYTHING WRITTEN HERE ACTUALLY WORKS RIGHT
EXEPT FOR [UIImage imageNamed:] METHOD USAGE
Implementation
I am using model in witch you have a custom UITableViewCell with one custom UIView set up as Cell's backgroundView.
Custom UIView contains two Cell-sized images (320x80 px), one of which is 100% transparent to half of the view....
I'm getting a potentially leaked object error from the Static Analyzer for this line:
strCleanPhone = [[[[strPhone stringByReplacingOccurrencesOfString:@" " withString:@""]
stringByReplacingOccurrencesOfString:@"(" withString:@""]
stringByReplacingOccurrencesOfString:@")" withString...
Hi
I'm reading the Core Data Utility tutorial from apple documentation and there's a part that's bugging me a bit.
At the beginning of "main" you got:
#import <Foundation/Foundation.h>
#import <CoreData/CoreData.h>
#include <objc/objc-auto.h>
Why you would need to include Foundation.h if it is already included in CoreData.h? the same...
I know that there is an iPhone app which lets you bump your phones together (called 'Bump' of course), but is there an open source library that allows you to connect to another phone upon 'bumping' phones...? Is is there an existing iOS API(s) which would allow this?
...
Is there any way to take the video feed from the camera of an iPhone and broadcast it to a local server (or remote if necessary)? It does not need to save it to the server, just to be able to access it. Sort of like a web cam app.
Thanks in advance
...
I'm new to objective-c and need some help setting this up. Basically, there's the main view and it opens a pop over view. the pop over has a segmented control with 2 buttons. clicking btn1 should save 0 to a variable in the main view, and btn2 should save 1. Closing the reopening the popover should display the previously selected value.
...
I would like to know how to draw a layer with some color [CGColorRef] in a window
When i am trying to addSubLayer to my window , the application is exiting without showing any exception.
...