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...
I believe I understand how to set NSAttributedString values but how on earth do you actually display them in the interface?
examples: UILabel, UITextView, etc.
Specific instructions would be greatly appreciated/
Thanks!
...
what is the difference between logic unit testing and application unit testing in xcode, OCUnit..?
...
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...
I have an an iphone app and am using shouldAutorotateToInterfaceOrientation to determine when to autorotate. On the iphone, I specify that UIInterfaceOrientationPortrait is the only allowed orientation; On the iPad, I just return YES (ie all allowed), like so:
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interf...
I have a very simple subclass of UIButton:
@interface MyButton : UIButton
@end
@implementation MyButton
- (id) initWithCoder:(NSCoder *)decoder
{
if (!(self = [super initWithCoder:decoder]))
return nil;
NSLog(@"-[%@ initWithCoder:%@]", self, decoder);
return self;
}
@end
In Interface Builder I add a UIButton, ...
what are the Steps for uploading iPhone application to apple store...?
...
Hi
I have 2 images.. How can i overlap them so i can get 1 UIImage? Setting the position of image 2 inside image 1 at X, Y
Thanks!
...
I've noticed that when I upload my code to my test device, it works fine... right up to the point that I unplug it from the computer. I assume this is because it needs to connect to the debugger or something, but I'd very much like to ensure that the program will work once it's distributed. How should I go about setting up the program so...
Hello. I'm diving into iOS development and I plan to build a few basic apps that make use of my own reusable code. As I update the files that contain my reusable code, I'd like those updates to be reflected in all the Xcode projects that use them. What are some ways I can do this?
Thanks in advance for your help!
...
My client's design calls for a table with cell content on irregularly-shaped white areas--basically a rectangle with a "tail". I'm constructing that out of a UIView and a transparent UIImageView holding the "tail" part of the design. It looks nice, with one exception.
When I select a cell, the whole thing turns blue EXCEPT the UIImages....
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?
...
I'm a pretty comfortable CoreData user. I had a problem that was absolutely killing me, figured out what was going wrong and have NO CLUE why it was causing the problems I was seeing. Can anyone explain this?
Okay, we have a main MOC that does most the 'read-only' data work and handles simple write operations. When we're about to do a b...
Hello. I've created an iPhone app project in Xcode and I'd like to change the name that is displayed under the app icon, as well as in alerts, etc. By default, the name of the app is the same as the name of the project. How can I change the name of my iOS app?
Thanks in advance for your help!
...
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.
...