Hi everyone,
im trying to implement some behaviors when a mapview element scrolls... by coding a delegate for the scrollview inside of a mapview.
so, right now, i got a pointer to the scroll view used by the map view in my code.
however, i wish to set the delegate of this scroll view inside the map view, but the issue is that the ...
Hi
I'm trying to write an NSDictionary to a plist but when I open the plist no data has been written to it.
From the log my path looks correct and my code is pretty standard.
Any ideas?
NSArray *keys = [NSArray arrayWithObjects:@"key1", @"key2", @"key3", nil];
NSArray *objects = [NSArray arrayWithObjects:@"value1", @"value2", @"value3...
I have a simple iPhone application that is very similar to the Page Control example provided by Apple. It creates a group of UIViewControllers dynamically, then adds them to a ScrollView.
When a button is touched on one of these views, I need to be able to call a method back in the UIApplicationDelegate. It will then do some calcula...
I have 2 numbers which are between 0 and 49. Let's call them x and y. Now I want to get a couple of other numbers which are not x or y, but are also between 0 and 49 (I am using Objective C but this is more of a general theory question I think?).
Method I thought of is:
int a;
int b;
int c;
do {
a = arc4random() % 49;
} while (...
I have a method that takes an (NSError **) but I don't want to pass it one. When I pass it "nil" or "NULL" I end up with "EXC_BAD_ACCESS".
The offending line is "*error = nil;"
How do I pass it the equivalent of "nil" without crashing?
...
Hi,
I am looking for a way to get a twitter users userid via their username.
For example take http://twitter.com/AlySSa_miLAno (yes I know her twitter page off by heart lol) on the right hand side of the page is a link to her RSS feed:
feed://twitter.com/statuses/user_timeline/26642006.rss
In this context Alyssa's userid would be 2664...
How do you check if an NSString begins with a certain character (the character *).
The * is an indicator for the type of the cell, so I need the contents of this NSString without the *, but need to know if the * exists.
...
Using the following code, the ctx is not correctly being created. It remains nil:
#import <QuartzCore/QuartzCore.h>
@implementation UIView(PDFWritingAdditions)
- (void)renderInPDFFile:(NSString*)path
{
CGRect mediaBox = self.bounds;
CGContextRef ctx = CGPDFContextCreateWithURL((CFURLRef)[NSURL URLWithString:path], &mediaBox, N...
// Make text white... and background blue
[myButton setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
[myButton setBackgroundColor:[UIColor blueColor]];
Should that make a button with white text... and a blue background?
It doesn't.
...
Hi All,
Having a problem with NSURLConnection, if I create a NSURLConnection and call [connection connectionWithRequest] let it load a little then call [connection cancel] most of the time that works fine. However occasionally even after I call [connection cancel] the connection's delegate still gets called (which crashes the app). Goo...
I'm extending UIButton with generic functionality to change certain appearance attributes based on the displayed title.
In order to do this, I need to detect and respond to changes in the "state" property. This is so I make sure the appearance is adjusted properly if the user has set different titles for different states. I assumed I ...
TurbineXMLParser.h
#import <Foundation/Foundation.h>
@interface TurbineXMLParser : NSObject <NSXMLParserDelegate> {
...
TurbineXMLParser.m
#import "TurbineXMLParser.h"
I have just added a new class to my current project that I previously tested in a single file. When I try and build the project I get the error: error: cannot find ...
I am putting an image into an IKImageView, and immediately sizing it to fit. Whenever I do this, the image originally appears at 1-1 size (huge) and then resizes down, which would be fine if the animation was smooth. However, the animation looks ... fluttery? There are big blocks, like 2 inches square, of the image that appear and shrink...
I have a view that will be displaying downloaded images and text. I'd like to handle all the downloading asynchronously using ASIHTTPRequest, but I'm not sure how to go about notifying the view when downloads are finished...
If I pass my view controller as the delegate of the ASIHTTPRequest, and then my view is destroyed (user navigates...
I am trying to see which button was clicked on so I can preform the correct logic.
This is the code for the buttons:
UIButton *button = [[UIButton alloc] initWithFrame:CGRectMake(270, 423, 60, 60)];
[button addTarget:self action:@selector(buttonPressedAction:)
forControlEvents:UIControlEventTouchUpInside];
[button setBackgroundIma...
Hello everyone,
I am a beginner ObjectiveC programmer, coming from the C++ world. I find it very difficult to understand the memory management offered by NSObject :/
Say I have the following class:
@interface User : NSObject
{
NSString* name;
}
@property (nonatomic,retain) NSString* name;
- (id) initWithName: (NSString*) theName...
I am modifying GLPaint to use a different background, so in this case it is white. Anyway the existing stamp they are using assumes the background is black, so I made a new background with an alpha channel. When I draw on the canvas it is still black, what gives? When I actually draw, I just bind the texture and it works. Something is wr...
Hi,
I'm trying to compile a project that uses the GData objective-c framework. I've successfully compiled and run the project under the 'Debug' configuration, but when I try to compile using 'Release' and now 'Adhoc' I get the following errors. NOTE: I duplicated the debug configuration for adhoc and that doesn't seem to help.
"_kGData...
Sample:
I've created a minimal set of files that highlight the issue here: http://uploads.omega.org.uk/Foo3.zip
If viewDidLoad/viewInitWithNibName are called, a message box is displayed. The message box is not displayed, therefore, the methods are not being called.
Details:
I have an application that is attempting to use a UITabBarCon...
I have a string that is UTC and would like to convert it to an NSDate.
static NSDateFormatter* _twitter_dateFormatter;
[_twitter_dateFormatter setFormatterBehavior:NSDateFormatterBehaviorDefault];
[_twitter_dateFormatter setDateFormat:@"EEE MMM dd HH:mm:ss ZZZ yyyy"];
[_twitter_dateFormatter setLocale:_en_us_locale];
NSDate *d = [_twi...