I have a modal view controller that I put onto screen using presentModalViewController:animated. This particular view controller, an instance of UIViewController, has a UITableView and cells with further detailAccessory options. Clicking on a date row should allow a controller with UIDatePicker to populate on the screen. The problem is t...
I'm wanting to add a Quartz Composer "patch editor" style interface element to my Cocoa/Objective C(++) application. For those unfamiliar with QC, the patch editor is a visual representation of the patch graph: effectively showing each node and it's properties, and providing a mouse driven select/click/drag interface. It looks like...
...
Hello and thanks for giving this question a gander.
It seems that PNG files that I drag/drop into IB do not display in the same manner that they are shown in the iPhone simulator. What gives? For example, if I want to drop in a PNG with rounded corners, IB shows hard rectangular corners but when I build to the simulator, I see the roun...
I'm trying to get bitmap context with the following code:
GContextRef MyCreateBitmapContext (int pixelsWide,
int pixelsHigh)
{
CGContextRef context = NULL;
CGColorSpaceRef colorSpace;
void * bitmapData;
int bitmapByteCount;
int bitmapBytesPerRow;
bitma...
- (id)copyWithZone:(NSZone *)zone {
PoolFacility *copy = [[[self class] allocWithZone:zone]init];
copy.name = [self.name copy];
copy.type = [self.type copy];
copy.phoneNumber = [self.phoneNumber copy];
//make sure I get proper copies of my dictionaries
copy.address = [self.address mutableCopy];
copy.webAddre...
What do I have to do for hiding this NSWindowToolbarButton in windows with a NSToolbar?
...
Hello,
I want to make all objects in an array perform a selector. I've discovered the appropriately named makeObjectsPerformSelector: method, but I have a question with it. If I use it on an array, will it change the existing array or return a new one? If it modifies the existing object, what be the easiest way to return a new array with...
hi
im trying to create a game in which few objects(UIImageViews) traverse the screen...
these objects are generated at an interval of 1 to 0.45 seconds...when they r generating in the range of 1-0.60 seconds they traverse smoothly..but when they generate at a rate less than 0.6 seconds their movement is not smooth they start jerking..als...
How to check if the content of a NSString is an integer value? Is there any readily available way?
There got to be some better way then doing something like this:
- (BOOL)isInteger:(NSString *)toCheck {
if([toCheck intValue] != 0) {
return true;
} else if([toCheck isEqualToString:@"0"]) {
return true;
} else {
return ...
I've been trying to adjust the font size for a UITextField that's embedded in a contentView of a UITableViewCell. I'm using cmd+T to bring up the font menu, and in there am using just the default font Helvetica size 18. Everytime I change the size it doesn't seem to make a difference at all when my UITextField is displayed. It's almost a...
I'm looking to get the current hour and minute on a user's iPhone for display in an app that doesn't show the status bar. Is there a simple way to do this?
Thanks,
Ben
...
The single underscore in Objective-C is apparently reserved for Apple's "internal" use (and was available for use with private instance variables prior to Apple's claim). But why would they use a double-underscore in their SQLiteBooks example for the iPhone? See this snippet taken from MasterViewController.m:
+ (EditingViewController *)...
I want to highlight the selected NSToolbarItem like e.g. in Adium (see screenshot).
Is there an easy way? If not, tell me the difficult one. =)
...
Hi,
I'm building an Objective-C app that has both a server and a client. The client can send updates to the server, and the server needs to be able to send updates to each connected client. I've been thinking about how best to implement this system, but am asking for your suggestions.
Currently, I'm thinking that when new updates are av...
I have a table where certain cells will be nil until the user fills them in, but I was hoping that I could change the null place-holder (i.e. the value it displays when the particular value for that cell is nil) depending on other parts of the application the user has already filled in or configured. Sort of like an auto-complete but not...
Whats the difference between the two?
I'm sure they have pros and cons, and situations they are better performers in.
Any resources that compare the two?
Is one better for animation (I imagine the CATransform3D)? Why?
Also I think I read somewhere that text clarity can be an issue, is one better at scaling text?
...
I have a View Controller I'm reusing to edit individual objects (NSString, NSNumber, NSDate) in a previous View Controller's TableView. I'm loosely basing this off of the EditingViewController in Apple's SQLiteBooks sample project. the datePicker is instantiated in the nib file.
The issue here is it works fine & dandy for the first dat...
I need to do some network bound calls (e.g., fetch a website) and I don't want it to block the UI. Should I be using NSThread's or python's threading module if I am working in pyobjc? I can't find any information on how to choose one over the other. Note, I don't really care about Python's GIL since my tasks are not CPU bound at all.
...
I'm using a method in my view to set a color, and in awakeFromNib I pass it a color using
[NSColor colorWithCalibratedRed: green: blue: alpha:]
The application kept crashing, with the error with "[NSCFNumber set] unrecognized selector."
After inserting a breakpoint, I found it was defining my variable as an "NSCalibratedRGBColor." The a...
I'm having slight difficult understanding why the following code is crashing an app of mine:
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"MMMM d, yyyy"];
NSDate *date = [dateFormatter dateFromString:cDate];
datePicker.date = date;
NSString *dateStr = [dateFormatter stringFromDate:date];...