Is anyone aware of a version of the iPhone UISlider control with two thumbs? I need a control that will allow specifying a range of values. The UISlider API docs would imply this isn't possible with the standard control, so I was wondering if anyone had a solution for this (or had solved it themselves).
...
How do I save an NSString as a .txt file on my apps local documents directory (UTF-8)?
...
Is there any way to quickly test whether an MKCoordinateRegion is good or not? I've swapped latitude for longitude and caused an application crash. I'd like to be able to see whether it's possible to perform a setRegion before I actually do it. Will MKCoordinateRegionMake test the values I give it?
Thanks.
...
Is there an obvious way to make a text input box that has rounded edges?
I'm not talking about setting a UITextField's borderStyle to UITextBorderStyleRoundedRect. That only gives me rounded corners.
I'm talking about the style text field used as input in the SMS app (before you hit send), or the UISearchBar. I've also seen it used in ...
Hey folks,
I am currently developing an app where I have kind of a main view with lots of subviews. Now I have two specific subviews and I want only one of them to be "touchable" at once. So both should be able to response to a touch event but it should not be able that both respond simultaneously. Since I have other subview which shoul...
There are two views:
viewA and viewB. Both are rotated.
The coordinate system for rotation is weird: It goes from 0 to 179,999999 or -179,99999 degrees. So essentially 179,99999 and -179,99999 are very close together!
I want to calculate how much degrees or radians are between these rotations.
For example:
viewA is rotated at 20 de...
I have a Core Data iPhone app that displays Subscription entities where any of its items are not read. In other words, I construct a predicate like this:
[NSPredicate predicateWithFormat:@"ANY items.read == NO"]
While this works for the initial fetch, it doesn't affect Subscription entities when I modify an Item, so the NSFetchedResul...
Hi,
in a class i'm writing i'll most likely have to use NSXMLParser twice to parse two different xml's, and i'm wondering which approach should i use?
- release the parser after it finished parsing url and reinitialize when need to parse the second url?
- use different class as delegate for parsing other url?
- or something else?
thanks...
From a background thread, I'm jumping back into the main thread to initialize an object (because it uses UIKit), which then gets reused by the background thread (which waits for the initialization), and memory management is not acting the way I suspect.
// called from another bg thread with autorelease pool
- (MyObject*)backgroundMethod...
I have a UIViewController that I've added UITableViewDelegate to. This controller has a corresponding nib. I've associated the two in IB. However, the nib's File's Owner doesn't show the tableview delegate or datasource. I have a similar controller and nib where the tableview delegate shows up fine in IB. I can't see any differences...
In objective-c (cocoa touch) I have a series of UIViewControllers that I am switching between.
- (void)switchViews:(id)sender
{
UIButton *button = (UIButton *)sender;
UIViewController *nextViewController;
int tag = button.tag;
switch (tag)
{
// -- has already been created
case kFinancialButton:
...
I'm wondering if there are any best practices for improving UI responsiveness while doing Core Data saves (not fetches) with large collections of managed objects.
The app I'm working on needs to download fairly large amounts of data on set intervals from a web service until complete. On each interval, a batch of data is downloaded, f...
I tried to follow the tutorial from this webpage about UITableView, but when I tried to implement additional features like asearch bar, editing / saving of text, and adding / deleting table rows nothing I wrote works.
Is there a better tutorial out there for working with UITableViewController?
...
Okay, this seems like it should be relatively simple, but I've been Googling for the better part of an hour, and can't seem to find what I need.
I have a view controller that has a few different parts: a background view, a header view, and a few buttons. Now, I want the header and buttons to autorotate properly (they do, when I return Y...
I have ten labels on a view positioned vertically. I need to evenly space them. Does IB have any type of setting that will do this?
...
I have an array with a list of objects sorted alphabetically ignoring the letters case (used a lowerCaseString method) and I need to sort it into an array of arrays one for each letter +1 for non alpha characters.
A simple way of doing it would be to loop through the source array with a giant 27 stack deep if else if else if else.... Ne...
I have a subclass of UIView that I've added to as the titleView of a navigationItem using the following line of code:
self.navigationItem.titleView = tempview;
Easy enough. That works fine. My problem is that this navigationItem sometimes has the rightBarButton updated (sometimes there is no button, sometimes there is one standard siz...
Essentially I'm sending data to a Java Socket Server from an iPhone app however something rather strange happens, it doesn't receive the data until the iPhone application is closed! I'm sure there is something I'm missing but I just can't seem to find it, it's all quite odd.
Here is how my connection is created:
-(CFSocketRef)initSocke...
I had considered writing a custom url cache, but it seems that NSURLCache is supposed to support a disk cache. I'd like to have my iphone app use cached responses without hitting the server at all until the resource becomes stale (as determined by the headers I send back from the server).
Do I have to call something fancy with NSURLCon...
This is vexing me in my utility app: I have a singleton declared in the manner specified here: http://cocoawithlove.com/2008/11/singletons-appdelegates-and-top-level.html
My singleton has 4 declared properties: 3 floats and an int. Now, in my view controller I set the properties like this in an updateSingleton method:
[[Singleton share...