I'm using a UIDatePicker in UIDatePickerModeCountDownTimer mode which lets the user select hours and minutes, but it won't let the user select zero hours and zero minutes.
If the hours are set to zero and the user tries to pick zero minutes, it automatically jumps to 01.
I've researched the docs and nothing seems to allow me to do that,...
Hello,
In my application on the iPhone and iPod Touch I want to be able to retrieve the country a person is in without accessing the internet. I know how to do this with internet, so I know how to retrieve the longitudes and latitudes, I've read something about a file with the world borders included, but I don't know how to use this in ...
Hey!
I'm trying to add some sort of a superglobal in my app. It will only store a small integer, but I need it to be accessible from anywhere in my app.
I know you can use the delegate for this, but wouldn't it be easier if you could just set a superglobal in your application (of course it has to be alterable)?
So, what is the best wa...
Starting off with a default "View based" application I create a new view (ViewToDisplay, class that inherits from UIView) and inside this view I create a layer (LayerToDisplay). The view draws something around the perimeter of the frame, and so does the layer but this time with dotted lines. This is to show / prove that the layer covers ...
I have a struct called Point
typedef struct {
GLfloat x;
GLfloat y;
} Point;
create an array of Points:
Point *sPoints;
for(int i=0 ... // define sPoints
somewhere else, I want to alter variables on those points. Why does this work:
sPoints[100].x+=10;
but this doesn't:
Point pt = sPoints[100];
pt.x +=10;
is there any way...
Hey!
How can you compare against multiple possibilities in one argument?
Example:
if ((integer == 2) || (integer == 5))
if ((string == "hello") || (string == "dolly))
Would save me a lot of code if you could write that like this:
if (integer == (2 || 5))
if (string == ("hello" || "dolly"))
...
How can I use/implement the new Graph API from facebook in iOS programming (objective C)? Also parsing the JSON file returned by the API? I can't seem to find any examples out there. Facebook resources doesn't give too many details on iOS development.
...
How can I store the latitude and longitude coordinates of the iPhone's current location into two different float variables?
...
I want to display a message to the users of my app in the UIStatusBar, but I'd like to maintain the scrollsToTop functionality so a user can tap on the statusbar and scroll a tableView up to the top.
I've looked into adding a UIWindow on top of the current status bar as in this question: http://stackoverflow.com/questions/2666792/add-u...
I need to darken a UIImageView when it gets touched, almost exactly like icons on the springboard (home screen).
Should I be added UIView with a 0.5 alpha and black background. This seems clumsy. Should I be using Layers or something (CALayers).
...
Hello,
I have been trying to figure out if it is possible to programmatically resize an NSArray, by code similar to this:
NSArray *resize = [NSArray arrayResized:oldarray size:10];
Which would a new NSArray (Not a NSMutableArray if it is possible) that has the elments after the end of oldarray padded with [NSNull null].
...
is there a way to get emails from google, send emails, and add contacts to the address book using the google API?
I'm doing an obj-c mac application.
...
I often want to execute some code a few microseconds in the future. Right now, I solve it like this:
- (void)someMethod
{
// some code
}
And this:
[self performSelector:@selector(someMethod) withObject:nil afterDelay:0.1];
It works, but I have to create a new method every time. Is it possible to use blocks instead of this? Basi...
I have a UITextView at the midle of View, UIToolBar at the bottom of View. I want visual keyboard appear above UIToolBar when i touch on UITextView. How can i do it?
...
I have an array which stores custom objects.
Objects are of type Venue which have a property defined as name(which contains the names of venue).
Now I want to filter out objects with unique names.
This is how I was trying to do.
NSSet *uniqueVenuesSet = [NSSet setWithArray:[venueArray valueForKey:@"name"]];
NSMutableArray *uniqueVe...
I'm working with Objective-C, but probably it doesn't matter the programming language for this. So basically I have an array, with say, the integers 12, 5, and 17, and I want to be able to pull out the largest number, or the smallest, or second smallest, etc.
Basically I want to be able to sort them into ascending or decending order so...
I'm working on an an app that updates both a UITableView and a UIScrollView. I like how UITableView updating works. As I add, remove, or update items, I call insertRowsAtIndexPaths:withRowAnimation:, reloadRowsAtIndexPaths:withRowAnimation:, and deleteRowsAtIndexPaths:withRowAnimation: as appropriate. However, updating the UIScrollView h...
I have an array with custom objects. Each array item has a field named "name". Now I want to remove duplicate entries based on this name value.
How should I go about achieving this.
Thanks in advance.
...
Is there any way define a object in a method, call a method of another object, and in that method use the first object:
-(IBAction)method{
class * instance = [[class alloc] initWithValue:value];
[instance method];
}
The method defined in class.m file:
-(void) method {
instance.value = someOtherValue;
}
...
When I try to compile my code where ann is an annotation, coordinate is a 2d coordinate, and latit is a float
ann.coordinate.latitude = latit;
I get an error message saying Ivalue required as left operand of assignment. What does this error mean and why is it showing up?
...