I'm trying to format a string to give me 2 characters for a number, no matter what its value. Right now, I have
[NSString stringWithFormat:@"%2d:%2d:%2d",h,m,s)];
and for the values 1, 2, 3, the output is
1: 2: 3
How do I change the spaces to 0's ?
...
hi all
i am playing the video and in the background i have to play the audio file and if i do this audio is not playing its sound as it just play video is it a extension problem i am using the .mp3 for the audio and .mp4 for the video .
how can we do this we have to play simultanisouly .both the file
balraj verma
...
I'm trying to load a new view into an existing view controller, but I want to load that view from a xib file. My plan was to create a second viewController (viewController1 in the code below), then retain its view and release that viewController that I just created. I was hoping that the viewController would be released and the view woul...
I may very well be confusing this with the Cocoa (Mac OS X) side of things so it may not exist in Cocoa-Touch...but I thought there was a way to quickly ask a NSSet to poll its members and return a sum of say an NSInteger property in each of its objects?
Closest I can find is objectEnumerator whereby I suppose I could rifle through each...
as a quick test of formatting very large, precise numbers i'm doing:
(number is a synthesized NSDecimalNumber...)
number = [[NSDecimalNumber alloc] initWithDecimal:[[NSDecimalNumber numberWithDouble:420000008698643507200000.0F] decimalValue]];
DLog(@"unformatted: %@", [number stringValue]);
which gives me: "unformatted: 4200000086986...
If you drag down list of your notes, search bar will come down. But if you keep dragging it, search bar still stays there right below navigation bar, creating "gutter" between search bar and the first row. Any idea how to do this?
Thanks
Check out the screenshot here: http://img39.imageshack.us/img39/8094/searchbar6420.jpg
...
So the past two clients I've been at, all the talk has been about creating an iPhone app, and I won't lie, I want to make one. Or at least learn how to make them.
I've never owned a Mac, so I have no idea how their OS functions/works/performs, whatever. I'm a .NET Developer and build my own gaming rigs at home, but as far as Mac hardw...
I am getting tricked up with arrays and nested arrays.
I would like this if statement to evaluate to True if lastObject doesn'texist, or if accelerometer.x - lastObject[0] > .1
My code doesn't do this.
if (![accelerometerArray lastObject] ||
[NSNumber numberWithDouble:acceleration.x] -
[[accelerometerArray lastObject] objectAtI...
How would one go about creating a 'beat box' style sound engine, where a series of sounds can be queued up ahead of time and during playback. These sounds need to play back without any gaps or hiccups though.
I've looked into OpenAL and have attempted to use the alSourceQueueBuffers() to create a source with a series of pre-buffered cl...
(IBAction) changeProductText:(NSString *)str;{
lblProductTxt.text = str;
}
I have that and i am trying to make it so that i can have the str and @"text" but i don't know how to bind them together.
Any thoughts?
...
Essentially, I'm working on asynchronously downloading images and adding them to specific UITableView cells (twitter profile images using MGTwitterEngine from Matt Gemmell).
I've looked at general asynchronous download code and must admit, I'm still too much of a noob to understand it well enough to adapt it to my purposes. Instead, I'm...
I'm using the method described by Josh in this question to add a toolbar to the top of the iPhone's keyboard. Basically, the idea is:
Add the view controller as an observer for the notifications UIKeyboardWillShowNotification and UIKeyboardWillHideNotification in its initialization method
Whenever those notifications are posted, animat...
How does one implement pinch gestures on the iPhone? I'm familiar with using touch events on the iPhone but I'm extremely lazy and don't want to re-invent the wheel for something as widespread as PINCH gestures...Source code or links thereto would be helpful.
...
hi,
i am making an application in which i have to show current location(the location which is clicked by camera)using latitude, longitude through web services on Google map & nearest location to the current location. i have done with showing current location, now i have to show which location is the nearest to location to current locati...
I'm a Windows developer looking to do some Cocoa dev on a Mac. I'm familiar with Subversion, TFS, Sourcegear Vault, CVS and VSS in a Windows environment. What version control should I look at using in my new, unfamiliar Mac environment?
I will be doing 95% of the development, with the other 5% coming from one or two other people. How...
We have an iphone device in our company and for the remote demo purpose I have to show some of the device specific features like voice call, accelerometer etc. (which is not possible on a iphone simulator), from a mac / windows system. Is there any way to render the device screens on mac /windows machine?
Advance Thanks,
Sathish
...
What's the best way of dealing with variables in constant use in an iPhone app, like username/password in a twitter client?
...
In the following code, the first log statement shows a decimal as expected, but the second logs NULL. What am I doing wrong?
NSDictionary *entry = [[NSDictionary alloc] initWithObjectsAndKeys:
@"x", [NSNumber numberWithDouble:acceleration.x],
@"y", [NSNumber numberWithDouble:acceleration.y],
@"z", [NSNumber numberWithDouble:accele...
Hi, In the code below, I am connecting to an SQLite Database, the SELECT query didn't work.
I hope you can help me.
Thanks
if(sqlite3_open([databasePath UTF8String], &database) == SQLITE_OK) {
// Setup the SQL Statement and compile it for faster access
const char *sqlStatement = "select name,score from game Where name='interclock'"...
I have a SQLite DB that I'm using to store app data, and I could do with taking a look inside it to debug a problem I'm having - but where does the iPhone Simulator store its data, typically?
...