I am running a keyFrame animation to move and flip a playing card view using CAKeyframeAnimation. is there any way to swap the cardFront and cardBack layers during the animation? or am i taking the wrong approach here...
...
I'm reading the source code of an open-source project and I've encountered the following category definition in an implementation file:
@interface QCView (Private)
- (void)_pause;
- (void)setClearsBackground:(BOOL)flag;
@end
At first I thought that the setClearsBackground method was being added to the QCView class definition. But when...
Hi,
In my table I want to have an ID column that is going to be unique and it is going to be autoincremented. I want to start from 0.
How can I implement it?
...
Hopefully that title is clear enough. Anyways, it seems:
[NSKeyedArchiver archiveRootObject:rootObject toFile:path];
is restricted to NSPropertyListBinaryFormat_v1_0.
I need the format to be human readable [so xml]. If you're interested, this is part of project I'll eventually put up on github with a blog post about "How to Unit Tes...
I'm getting a crash from this routine after adding the :(id)sender so I could determine which button called it. When set up as plain old toggleView3 it works perfectly. The crash occurs when detailView is toggled back to docView.
'NSInvalidArgumentException', reason: '*** -[RootViewController toggleView3]: unrecognized selector sent to ...
I want to have a view on a window and in response to a message (button click or menu) I want to have another view slide down above it, and have the first view resize.
I want to go from this:
**********************************
* *
*--------------------------------*
*| |*
*| ...
I have some code that looks like the following:
NSMutableArray *bar = [[NSMutableArray alloc] initWithCapacity:0];
NSMutableDictionary *foo = [[NSMutableDictionary alloc] initWithCapacity:0];
[foo setObject:[NSNull null] forKey:@"yay"];
[bar addObject:foo];
[foo release];
Instruments is showing that foo is leaking. I understand why t...
How is objective-c possibly a superset of C? It makes no sense. There is no stack in objective-c from what I can tell. Also, in C there is no need to use [] whenever invoking a method. Please explain.
...
Hello. How do you set @synthesize for an array like: float rgb[3]. Also, is the @property line: @property(nonatomic, assign) float rgb?? Thanks
...
I'm working with the Xcode Utility template. In rootViewController.m there's a section that sets up the navbar for what's called the FlipSideView:
(snip)
UINavigationItem *navigationItem = [[UINavigationItem alloc] initWithTitle:@"Title"];
(snip)
How can you programatically change the navbar title from within the FlipsideViewControl...
Hi,
I'm new to Obj-c programing, and wonder how find a performance bottenecj.
I have a UITable that load chunks of 50 objects from a sqlite database.
Then, when the user scroll, I load the next 50 objects until finish.
However, I find that the scrolling stop for a seconds. I wanna know why.
I don't think that 50 objects is that muc...
I have an NSDate that I get from a UIDatepicker.
IBOutlet UIDatePicker *dueDate;
NSDate *selectedDate = [dueDate date];
how do I retrieve the month from dueDate in the form of an int? (1 for Jan, 2 for Feb, etc)
...
How can I force a UIScrollView in which paging and scrolling are on to move vertically or horizontally only?
My understanding is that the directionalLockEnabled property should achieve this, but a diagonal swipe still causes the view to scroll diagonally instead of restricting motion to a single axis.
Edit: to be clearer, I'd like to a...
Basically, I draw a 3D cube, I can spin it around but I want to be able to touch it and know where on my cube's surface the user touched.
I'm using for setting up, generating and spinning. Its based on the Molecules code and NeHe tutorial #5.
Any help, links, tutorials and code would be greatly appreciated. I have lots of development...
Newbie question. Looking at arrays (ie: dynamically sized) this works:
NSArray *array;
array = [NSArray arrayWithObjects:
@"one", @"two", nil];
This does not:
array = [NSArray arrayWithObjects:
1, 2, nil];
Ok, I get it. This works:
array = [NSArray arrayWithObjects:
[NSNumber numberWithInt:1], [NSNumber numberWith...
my .h file is as follows
#import <Foundation/Foundation.h>
@interface MyClass : NSObject {
}
- (void) addWidget: (Widget*)aWidget;
@end
For sake of example, Widget is just some simple class that only holds a couple of strings. Apparently, either i'm doing something wrong or am just spoiled by Java / C# because when I try building, t...
I'm writing a contextual "factory" that will maintain a dictionary of converter/acting objects which inherit from some Converter class. This class has a method:
- (Class)classResponsibility
Or something similar, such that a StringConverter class would implement the method as:
- (Class)classResponsibility {
return [NSString class]...
I'd like to make a URL click able in the email app. The problem is that a parameterized URL breaks this because of "&" in the URL. The body variable below is the problem line. Both versions of "body" are incorrect. Once the email app opens, text stops at "...link:". What is needed to encode the ampersand?
NSString *subject = @"This...
What are the settings in Xcode to strip symbols for an iphone application?
I use these settings in Xcode but still see classnames and their methods in
the executable using a binary file editor.
Deployment:
1) Deployment Postprocessing (checked)
2) Strip Debug Symbols During Copy (checked)
3) Strip Linked Product (checked)
4) Use Separ...
In Java, it is very easy to code the following design:
public abstract class Pizza {
public static final Pizza.NULL = new Pizza() {
/* "null" implementations */
}
/* actual/abstract implmentations */
}
What is the preferred method to attain the same efficient scenario in Objective-C? I have been unable to find any...