okay, I know I am new to obj-c, but for all intents and purposes the following below SEEMS like it should work:
songCollection = [[NSMutableArray alloc] init];
[songCollection addObject:@"test"];
//Array is init, and I can see it in the debugger.
songCollection = [GeneralFunctions getJSONAsArray:@"library"];
// I can see...
I would like to create a framework for some reusable code that I would like to include in other iPhone apps. What is the best way to do it? Ideally, I would like it to work just like builtin frameworks and have the app use it without mucking around with build files.
...
I'm just starting to use multithreading and was looking for a good explanation. I'm not sure if there are differences in how multithreading works on Macs and iPhones. Does anyone have a good link to tutorials with example code?
Thanks.
...
i want to add a search bar under the navigation bar with uitableview.
and i want to search from the database?
any idea how to do this
...
This is probably a silly and easy question, but it seems sometimes the simplest things give me more problems!
This formula is suppose to give me a number between 0 and 100.
(200 / 23) * Abs(Mod(2987, 23) - 23 / 2)
In objective C I coded it like this:
(200 / 23) * abs(2987 % 23) - (23 / 2);
Is the formula flawed (and doesn't give a...
Does it matter if I call the method of the super class first thing or at the end? For example
-(void)didReceiveMemoryWarning {
/* do a bunch of stuff */
[super didReceiveMemoryWarning];
}
versus
-(void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
/* do a bunch of stuff */
}
same question for other method...
Hello,
I'm writing a game that displays 56 hexagon pieces filling the screen in the shape of a board. I'm currently drawing each piece using a singleton rendering class that when called to draw a piece, creates a path from 6 points based of the coordinate passed in. This path is filled with a solid color and then a 59x59 png with an alp...
How can I remove the first \n character from an NSString?
Edit: Just to clarify, what I would like to do is:
If the first line of the string contains a \n character, delete it else do nothing.
ie: If the string is like this:
@"\nhello, this is the first line\nthis is the second line"
and opposed to a string that does not contain a ...
Hi,
I have to create same functionality as facebook has does like all the photos display at one view and from that user can choose photo and it goes to large photo. This photos are showing very fast. I have 5 photos from web but it take so much time. Does anyone know how they shows photo very fast.
...
Hi,
I'm trying to play/stream a mp3 hosted on a website. The site requires a cookie header to be set, but I'm having trouble setting that or getting the container to do that for me.
NSURL *sampleUrl = [NSURL URLWithString:@"http://domain/files/sample.mp3"];
NSData *sampleAudio = [NSData dataWithContentsOfURL:sampleUrl];
Up until ...
Hello. I'm looking for a way to encode an mp3 file on the iPhone. I'm writing an app that records an audio clip with the microphone and uploads it to a server. The iPhone SDK has APIs to write out .caf and .aiff, but I didn't find any support for mp3. Since I'm uploading to a server, these uncompressed formats are way too big--hence my i...
Hi, I've created a UIBarButtonItem and then set self.navigationItem.rightBarButtonItem to the item.
However, setting the width property of the barButtonItem doesn't seem to have any effect on the width of the button (I'm trying to reduce the width of the barButton)
If I use a custom view for the UIBarButtonItem, I'm able to set the wid...
Hello,
I have a tableview (linked to a database) and a search bar. When I type something in the search bar, I do a quick search in the database and display the results as I type.
The query looks like this:
SELECT * FROM MyTable WHERE name LIKE '%NAME%'
Everything works fine as long as I use only ASCII characters. What I want is to t...
as title, can i position the UITableViewCellEditingStyleDelete button/icon to be within the tableviewcell of a grouped tableview rather than outside of it?
...
i am developing a iphone app. i have a background image lets say an airplane with black color out lines and from color palette user can pick a color and fill the region of airplane....any help, code , suggestion will highly be appriciated
...
i want to show 4 options(strings) randomly on uitableviewcell how do i achieve this???
...
I am trying to implement SMS kind of swipe and delete functionality.
In case of SMS application, an Edit button is on the left side of the navigation bar. When a swipe is attempted on a row, the Edit button changes to a Done button. If you click on Done button, the Delete mode is cancelled. If you click anywhere else on the tableview or...
I have a UITableViewController subclass with sections. The sections are showing with the default style (no rounded corners). How can I set the TableView style to grouped in the code? I'm not using Interface Builder for this, so I need something like
[self.tableView setGroupedStyle]
I searched on Stack Overflow, but couldn't come up wi...
NSHost doesnot support to iphone... When i run this in simulator it works fine... But when i want to run in device means its give an NSHost.h error....
I want do this in device also..
How could i fix this
Thanks in advance
...
I have a rather basic question. I have several(5) UIImageView images on
my screen. When I click a button, I want to change each image
to something else. I also want to play a sound as each image is changed.
So I basically want a clicking sound as each image changes.
The problem is, for some reason if I have say 5 images,
the...