I have a UITextField that has data in it separated by commas (i.e, 1,2,4) I want to look at this string and extract all the numbers out of it that are separated by the commas and put it in and array. So in this example 1 2 4 would be stored in an array. Can someone help me code something like this?
...
I would like to provide spreadsheet capability in my Cocoa application. From what I've heard, OpenOffice does allow some level of embedding, but I'll be darned if I can find that information in their official SDK documentation. Can anyone here point me in the right direction?
...
I would like to make an infinite scrolling on a UITableViewController, I'm using the scrollViewDidScroll: method to check the contentOffset, however I'm not able to drill down an offset that would be the bottom of the ScrollView.
Any suggestions?
Thanks in advance.
...
I've started cleaning up my app before publication - using "Instruments" Leak analyzer.
I found a leak I can't plug. So I built a simple project to illustrate the problem. Please see code below. I put a button on the view to test fire the procedure "test". It always generates a leak.
First the header and code for an object named "th...
I am trying to intercept an NSArrayController (thingsController) addObject method with the following accessor method.
- (void)insertObject:(Thing *)thing
inThingsAtIndex:(NSUInteger)index;
I have two classes: Thing and MyDocument. Thing has one property: name. MyDocument has an NSMutableArray called things and an NSArrayController ...
Hi everyone..
Want to know whether its possible to change the time of the iPhone through an application.. Is that level of dev access granted in iOS4?
My gut feeling is no, but I'm looking for a definitive Yes/No answer if possible.
Note: NSTimeZone class states 'Cocoa does not provide any API to change the time zone of the computer,...
I'm making an accelerometer based app using cocos2d, and I noticed that it's possible to set the accelerometer update time.
[[UIAccelerometer sharedAccelerometer] setUpdateInterval: (1.0f / 60.0f)];
I was wondering if updating the accelerometer very often like this, 60 times a second is a battery drain? Or should I not worry at all?
...
enum and #define appears to be able to do the same thing, for the example below defining a style. Understand that #define is macro substitution for compiler preprocessor. Is there any circumstances one is preferred over the other?
typedef enum {
SelectionStyleNone,
SelectionStyleBlue,
SelectionStyleRed
} SelectionStyle;
vs...
Hey.
Do you know if there is a simple database framework that is free to use in iPhone development?
I've tried to get my head around Apple's framework SQLite3-framework, but it is just too complicated. Why can't it just be like PHP and databases …
So basically, what I want is a framework that is simple to use and can handle databases....
Hello,
I added the reachability.m and .h files. When theres no internet connection, i want to display a UIView which is semi transparent and and comes up at the bottem like a Toolbar saying No internet Connection Available
I've got the code etc.. but i need a way to display the UIView i created and to push it to the front of everything...
The iphone app im writing displays an html page, i would like to add a search feature where the user can search for instances for the keyword and highlighted (like in firefox ctrl+F)
what's the best way to do this? in objective-c? would this be even possible with javascript?
...
Hi, I am not sure if the leak is in my implementation or is it from apple's side....
Instruments indicate me that I have a leak in this line :
if (![[self fetchedResultsController]
performFetch:&error])
I am adding annotations by reading the fetchController to the Map.... like this :
-(void)fillMapWithAnnotations{
NSError...
I have a UITableView with the editingAccessoryType set to UITableViewCellAccessoryDisclosureIndicator. The result is this:
It works, but I have a custom background, and therefore a custom separator color. However, the divider between the rearrange control and the accessory is set to the same standard table view separator color. Is the...
I have a need to archive an array of objects of several different types. Each object has its own instance vars.
Is it better to create singleton object with an array that holds ~20 archived objects, or have a single archived object that has an array of all the other objects? Sorry if that's confusing, but I'm a bit confused myself.
...
To, for example, access variables in a NSDictionary Cocoa frameworks often define keys, such as UIKeyboardBoundsUserInfoKey. How can I check if a key is defined at runtime? I found examples on how to check for classes and functions, but not for constants.
...
If you have a method in objective c that builds an array or dictionary using a mutable object, should you then copy the object, or return the mutable version? This is probably a case of opinion but I have never been able to make up my mind. Here are two examples to show what I am talking about:
- (NSArray *)myMeth
{
NSMutableArray *...
I have a grouped UITableView that contains several cells (just standard UITableViewCells), all of which are of UITableViewCellStyleSubtitle style. Bueno. However, when I insert images into them (using the provided imageView property), the corners on the left side become square.
The code being used to assign the values into the cell is...
Hi folks,
I want to create a sidebar in one of my mac applications. Basically it will look much like the Things sidebar.
Here is the picture that I basically want to recreate - http://i48.tinypic.com/c25ix.png
I can't figure out how to show the "sections" (collect, focus and active projects) and how to have certain items always show u...
Hi guys,
I am getting NSCFString for the code below:
NSString *urlString;
/* leak showing below line */
urlString = [urlString stringByReplacingOccurrencesOfString:@"\n" withString:@""];
I am not getting how to solve this please can any one help me to solve this leak.
Thanks In advance.
...
Hii Frnz,
I am developing an app which computes the distance travelled by the person and shows a map view which draws a line showing the user path from initial position to final position.
Now I am stuck as to how to trace a line on the user path...Should I try a custom annotations(or overlays) or is it possible to draw line on user pat...