NSDateFormatter *aDateFormatter = [[NSDateFormatter alloc] init];
[aDateFormatter setLocale:aLocale];
[aDateFormatter setDateStyle:NSDateFormatterFullStyle];
[aDateFormatter setDateFormat:@"EEE, MMM dd, yyyy"];
NSDate *aDateFromString = [aDateFormatter dateFromString:aKey];
Here,
aKey = lun, October 11, 2010
aLocale = fr_CH
My aDateFr...
I have a few apps that I am trying to develop a reusable URL connection layer. I have done some research and am struggling between architectures. Specifically the APIs this layer utilizes.
In the past, I have used NSURLConnection and NSOperation on a separate RunLoop. This seems overkill. I've seen libraries that subclass NSURLConnectio...
I'm trying to write a simple chat application for the iPhone (as an experiment). Is there a simple way for two devices to discover each others' IP addresses, and given the addresses is there a simple API or protocol that would let me send text messages back and forth?
I've investigated SIP (specifically Sofia and eXosip), but these too...
Hello,
I am having a... strange problem.
I am adding an NSDictionary to an NSArray, then saving it to the defaults. When I check the object count of that key on the user defaults, it says the count is 0, but the array that's "on memory" has that object (so the count is 1).
The code, along with the output it gives is this:
(array is a...
I have one array that is pre-filled with dictionaries with each dictionary consisting of two keys.
{
name = object1;
quantity = 5;
},
{
name = object2;
quantity = 2;
}
I want to be able to add more objects and combine any duplicate dictionaries. So for example, if I added 5 of object one and 3 of object 2, this would be t...
I currently have 3 simple UIImageViews that animate across a UIView in my app.
The animations work fine in the simulator.
However, when I test the app on the device, all I see is a blank UIView.
Are there any special libraries/header files I need to import to fix the problem of animation not appearing on the device?
...
When i Clicked on view its create a star shape path.
Now i want to spin the star which is added to CALayer.
Can any one help me out.... How to spin the CALayer on iphone.
-(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{
UITouch *touch=[touches anyObject];
currentPoint=[touch locationInView:self.view];
...
The Contacts app on the iPhone seems to use a grouped UITableView with what looks like an image outside the table and rows of text adjacent to the image are shifted. Like this:
How do you go about creating a layout like this with the first three rows placed at a different X position than the other rows?
I tried modifying the cell's fr...
I have an iPhone application which uses FBConnect to log the user in and also get some extended permissions. Now I need an infinite FB session key to post some info on the user's wall and I am trying to get the offline_access extended permission which seems to be not working.
FBPermissionDialog is not even showing that offline_access pe...
I'd like to show the current language that the device UI is using. What code would I use?
I want this as an NSString in fully spelled out format. (Not @"en_US")
...
As a proof of concept, I want to create an application that retrieve the current coordinates, calculate the direction towards an another point and, using compass, rotate an arrow image to direct to that point in space.
I know how to retrieve current coordinate and to rotate the image through CGAffineTransformMakeRotation, but I haven't ...
I want to place some "handles" on a UIView I have on-screen.
So, I'm creating more UIViews, one at each corner of the UIView's frame rectangle, and I simply want to draw a circle that "fills" the rectangle that is the frame of the "handle" UIView.
Here's what I mean:
How I create the "HandleView":
CGPoint upperLeft = CGPointMake([[se...
Actually, i am making an iphone appication in which i am using the touch events.
Initially i drag the uibutton on the scrollview & it will call the touch event delegates for uibutton i.e touchbegan, touchmove & touchdrag. Now if i want to change the location of the uibutton on the scrollview , i need to drag the uibutton. If i drag the...
Hi all,
This seems really simple but I can't see that NSNumberFormatter has a function for this which is strange. I have a number, lets say 4.1. I want to round that to 5. I figured if I used NSNumberFormatter and set the roundingMode to NSNumberFormatterRoundUp I would get the desired result. But the only way I seem to be able get my n...
I have an UIScrollView subclass where I implement all of those 4 touch event handling methods like -touchesBegan:withEvent:, etc.
On the iPhone, the tracking works fine. I get plenty of -touchesMoved:withEvent: calls while the finger moves along the scroll view.
I've set the self.canCancelContentTouches = NO;.
I've also overwritten th...
I have UITable which contains some UIButtons. I would like a way to use the label.
The problem I have is that I need two tag labels, one for retrieving the cell in tableviewCellWithReuseIdentifier and configureCell.
Until recently I have been using the UIButton.title to determine which row in the table I selected. The (invisible) text...
as the question says, i want to simply send data from the iphone (ipad later) to a computer so max msp can retrieve the data (string) and do whatever over a wifi local network.
Its as simple as that. i don't want fancy any interface on the sending/receiving end or any extra options.
Thats all i want.
Can anyone guide me with this ple...
Can someone help me understanding and resolving this error I am getting when connecting to web service:
NSURLError is: Domain=NSURLErrorDomain Code=-1005 "The network connection was lost."
NSErrorFailingURLStringKey=http://username:[email protected]:443/zws/xmlrpc/restricted1/, NSErrorFailingURLKey=http://username:[email protected]:443/zws/xm...
I have date string: Monday, October 11, 2010. How can I create a NSDate object out of it and then get different components like day, month, date, year from it. Please note that format/locale of this string may change at runtime.
...
At some part of my code I am using this line
[[self navigationController] pushViewController:myController animated:YES];
This works perfectly and pushes a view, coming from bottom, over the current one, covering the last one completely.
I am wondering if there's a way to make it cover just part of screen. Let's say, just the half bot...