Once again :)
I've got the following code:
-(void)removeFilesWithPathIndices:(NSIndexSet*)indexSet {
NSInteger index = [indexSet firstIndex];
while(index >= 0) {
[self removeFileWithPathIndex:index];
index = [indexSet indexGreaterThanIndex:index];
}
}
Which should iterate through an NSIndexSet. However, th...
I am working on a project with several custom classes. I have a CardModel (NSObject) that has some integer properties to hold data, and a Deck (NSObject) that has an array to hold a bunch of CardModels and then a CardView (UIView) that has a CardModel as a property that I make when I select a CardModel from a Deck. And then I've got a ...
Running Instruments on my iPad app found 2 leaks, except I cannot understand where they are coming from. The first one is in this method in my app delegate:
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
[window addSubview:self.viewController.view]; // <--- it leak...
My app loads the Default.png file and then either crashes or goes black depending on which version I use. It ran fine in SDK3. I went to my console in xcode and found this...
Pending breakpoint 2 - ""OneAppDelegate.m":33" resolved
Pending breakpoint 3 - ""OneAppDelegate.m":82" resolved
Pending breakpoint 4 - ""OneViewController.m":57"...
Example of what I am trying to do:
String = "This is my sentence"
I am looking to get this as a result: "TIMS"
I am struggling with objective-c and strings for some reason
...
So, I'm having some issues with my implementation of the Three20 TTLauncherView. I am using their code, not a fork (although I have heard of rodmaz's version), and I can't get it to work properly. This is what my app looks like.
I removed the icon image, that's not the issue. The issue is, at the top there is no Navigation bar at a...
The documentation for NSPasteboard's -types reads:
Return Value
An array of NSString objects
containing the union of the types of
data declared for all the pasteboard
items on the receiver. The returned
types are listed in the order they
were declared.
Despite this, I have an NSPasteboard with only one NSPasteboardIt...
I'm unable to refer to my integer pickedItem declared in my RootViewController.h in my DetailViewController.m file.
Not sure if I should declare this as a global variable, but tried unsuccessfully to do so.
I think this should be simple, but I haven't got any other suggestions (from other posted answers) to work.
Thanks in advance.
...
How do I isolate touch events from each other? For example, I have one method that should be called if the view detects a single tap, and another method that should be called if the view detects a double-tap. The problem with the way I'm doing it is that a double-tap is always interpreted as a single tap before it is intereperted as a do...
I'm making an iPhone-app with particles moving on a custom UIView, drawn with Core Graphics. I want my particles to leave a trace, so when the view is repainted I want it to fill the background with 0.8 alpha.
Anyone knows how to do this? I've tried setting the background color of the view to something transparent in IB, but that doesn...
I need to add a Pause/Wait function to my iphone objective-c app. The function sleep() doesn't work for me.
Need to Add Pause/Wait Funtion between both of these.
myscore += [self getcard];
myscore += [self getcard];
...
Hi everyone, i am trying to fill the rows of my uipickerview with content and i'm trying to do it like this:
- (NSString *)pickerView:(UIPickerView *)pickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component {
NSString *test;
for (int i; i<5; i++) {
if (row == i) {
test = [NSString stringWithFormat:@"%...
Hey guys...
I'm stuck trying to pop a TTPhotoViewController from three20. At first it did not come with a back button, but I have now implemented it and tried to pop the view with no luck. Here's a snippet of my code:
Button (this works) --
self.navigationItem.leftBarButtonItem = [[UIBarButtonItem alloc] initWithTitle:TTLocalizedStrin...
I'm trying to hide a CALayer after a few microseconds and I'm using CABasicAnimation to animate the hide.
At the moment I'm trying to use
[aLayer setHidden:YES];
CABasicAnimation * hideAnimation = [CABasicAnimation animationWithKeyPath:@"hidden"];
[hideAnimation setDuration:aDuration];
[hideAnimation setFromValue:[NSNumber numberWithB...
I'm setting a UIImageView into my table cells during - (UITableViewCell *)tableView:(UITableView *)tableVw cellForRowAtIndexPath:(NSIndexPath *)indexPath
They are stretchable images (created with stretchableImageWithLeftCapWidth)
How can I update their size when my table view is rotated to another orientation?
...
I have made some progress and am editing the question to be current again. My big issue now is that the grouped table view will load, but shows all of everything in each section with each row. Also, my UIAlertView is returning all references to my plist (null). How would I fix this because the references to the plist are killing me. Any ...
I created a custom class that inherits from UIView and I want to display an instance on the screen. However, when I try to link the outlet from the App Delegate to the object I dragged onto the screen (which is that custom class I created) the link cannot be created.
What am I missing?
...
If i have this function:
-(CGPoint)limitPosition:(CGPoint)position {
//code here
return position;
}
how do I return it to a variable?
This:
CGPoint a;
CGPoint b;
a = [self limitPosition: b];
Doesnt work.
...
I have an application that uses ObjectiveResource and has a class that contains NSNumber properties. I am trying to format the NSNumber values as integers, and have the following code:
NSNumberFormatter *formatter = [[NSNumberFormatter alloc] init];
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
NSLog(@"Price: %@", [format...
How do I print the value of -> event.latitude = [[values objectAtIndex:0] floatValue]; ?
Below is some of my code:
@interface SeismicEvent : NSObject <MKAnnotation>{
float latitude;
float longitude;
**This is an object
SeismicEvent *event;
** This reads in a float
event.latitude = [[values objectAtIndex:0] floatValue];
Ho...