For some crazy reason I can't find a way to get a list of files with a glob for a given directory.
I'm currently stuck with something along the lines of:
NSString *bundleRoot = [[NSBundle mainBundle] bundlePath];
NSArray *dirContents = [[NSFileManager defaultManager]
directoryContentsAtPath:bundleRoot];
..and...
I would like to zoom in/out an UIImage object when the user performs the standard pinch action on my application. I'm currently using a UIImageView to display my image, if that detail helps in any way.
I'm trying to figure out how to do this, but no such luck so far.
Any clues?
...
So, In our appDelegate we're all used to creating a uinavigationcontroller outlet and linking it to a uinavigationcontroller in the XIB.
However in subsequent viewcontrollers I can only add uibarbuttonitems programatically by accessing the uinavigationcontroller. Is there a way to add buttons to applications uinavigationcontroller in th...
Hello,
I have a iPhone program that has a UIImage. This UIImage needs to be transferred to a javascript Image object in a UIWebView. I was thinking this could be done by using a data url I send to the UIWebView like this:
[wview stringByEvaluatingJavaScriptFromString:@"loadimage('%d')",dataurlfromuiimage];
So, I need to transfer my UI...
I just found the Omni Group's frameworks they make available for use under a modified MIT License:
http://www.omnigroup.com/developer/
The OmniDataObjects framework seems especially useful, since there is no Core Data for the iPhone.
I am new to the Cocoa platform, and don't know what other useful frameworks are out there.
What framew...
Hello,
In my app I change the value of a text label from an initial value of 0 and increment it on a touch event. Sometimes, but not all the time, the new value will be overlayed over the 0, which is not cool..
This is the relevant code:
UITableViewCell *cell = [tableView cellForRowAtIndexPath:indexPath];
UILabel *label = (UILabel *)[...
I have a menu that let's a user select a country. Exactly like that in the contacts.app country menu within the address field.
Does anyone know a simple way of getting a list of countries? I have used NSLocale to generate an array of countries but it's only the country codes unfortunately and not the human readable equivalent. I don't ...
I have a UITabBarController based application. The tabs will be created from database entries, so I don't know them in advance. I'd like to programmatically initialize a UINavigationController subclass (I have a few different kinds) for each tab.
Ideally, I would really like to draw the whole UINavigationController subclass + it's subv...
I have a view that has a background image and a CGPath that gets changed as the user touches the screen. Drawing the image with CGContextDrawImage() and then drawing the path on top is not fast enough and it hinders the touch event performance. What I would like to have is to have a bitmap buffer and only draw the changes in the path to ...
I've got a UINavigationController and i've changed it to white using the Tint property of the navigation bar in Interface Builder. But the text in buttons and the title is still the default color, white, and so gets lost against the white background. Anyone know how to work around this?
...
Does anyone know why CGContextDrawImage would be drawing my image upside down? I am loading an image in from my application:
UIImage *image = [UIImage imageNamed:@"testImage.png"];
And then simply asking core graphics to draw it to my context:
CGContextDrawImage(context, CGRectMake(0, 0, 145, 15), image.CGImage);
It renders in the ...
i got an object and in that object i start my thread (for loading doing some url loading)
when i have a return of my data i call a selector to perform on the main thread.
works fine if i call it the first time , second time it crashes ( no specific error)
[NSThread detachNewThreadSelector:@selector(doThread:)
toTarget:self
...
How should I go about creating a UI similar to the Springboard (home screen) on the iPhone? I'd like a grid of evenly spaced buttons with images where I can respond to the button tap.
Is the UITable a good fit? Should I use a plain UIView and position the icons manually in DrawRect? Is there an alternative that will automatically evenly...
In my iPhone project, I've got a UIView where I implement the drawRect method:
- (void)drawRect:(CGRect)rect {
CGContextRef context = UIGraphicsGetCurrentContext();
Inside the method I do a whole bunch of drawing of lines, images and texts using this context. The problem is that when I re-use this view, the context does not get re...
Hi
In my game When i am applying touches on my subView very fast it just buffered all the touches and detect it after some time. And it apply all the touches result at a time. Means it takes noticeable delay to detect my touches on iphone so please can any one tell me how to solve this problem. So it will detect my touch when i am doing...
I have an iPhone application with a settings.bundle that handles various settings for my application. I can set default values in my root.plist file (using the DefaultValue property), but these only get used the first time the user opens the settings app. Is there any way to get these values written out when your application installs? I ...
Specifically, what am I supposed to do with the view that is now hidden after pushing on a new view controller?
In my situation I have a view with animations going on, that continue to execute after the view is off screen.
Is there some accepted convention?
Do I remove the View Controller and View from memory?
Does Cocoa Touch have a co...
Is there a built in way to create round-cornered UILabels? If the answer is no, how would one go about creating such an object?
...
Hi,
I have a UINavigationController. In its toolbar is a segmented control with two buttons. Each button relates to its own UITableViewController.
What I'm trying to achieve is someway of wiring up the navigation controller so that the views are switched depending on which button within the segmented control is active.
I assume I shou...
I have an application where the user can log in but i don't want the user to enter his credentials every time he wants to use the application. 1 time would be sufficient but how(and whats the best way) to save 2 strings that i can revive by starting the application.
...