I have a cocoa 'category' for adding inflections (pluralize, singularize, etc.) to NSString. The code requires loading a set of regular expression rules and exceptions from a PLIST into dictionaries and arrays, as well as adding manual exceptions from code. I need a way to persist these data structures (as class members) between multiple...
Hi guys,
I am new to core graphics in iphone can anyone suggest how to work on that and the process to go through it.Also can any one provide me a document with sample codes.
Thanks in advance.
Monish.
...
I want to populate one.plist files from a number of .plist files as per the user selection .
How to populate UIPickerView with a .plist file ?
...
I am using UIImageView to create a simple animation and everything works perfectly, but when I use startAnimating, the animation will run once (as I want it to) but go back to the first frame. I want the animation to stop on the last frame.
I use:
myAnimation.animationImages = myArray;
myAnimation.animationDuration = 0.7;
myAnimation.a...
How can I get only the date from a DatePicker component on iPhone? (better with a specific format).
...
Hello friends,
I want to make my background view disable on button click event or any other event like as UIAlertView view comes which makes background view Non Active.
How to do that? please help.
Thanks in advance.
...
I have class Child inherited from class Parent. What I want is to send message to child, which has implementation of that message. So it's like calling pure virtual function from parent. If I send message now from Parent I'll get warning that Parent may not respond to this message. It is true, because only Child has implementation of it....
I'm experiencing a weird problem. I have a for loop, inside the loop there is a switch statement. The counter in the for loop is a pointer that points to the beginning of a primitive array, it increments itself till it finds a "terminator number". The array pointed is used to build a view, each elements represent a subview to put in the ...
My app won't save the data or load the data, it just crashes, I wonder what I'm doing wrong in my High Score Manager class.
I'm going to post my class's .h and .m file:
.h
#import <Foundation/Foundation.h>
@interface Score : NSObject
{
NSString *name;
NSNumber *score;
}
@property (assign, nonatomic) NSString *name;
@property...
I need a value to be calculated in it's getter method if it isn't set already. I prefer to use a nullable int construction, so I don't need another bool to check if it's already been calculated.
My first hunch was to go for a NSInteger *. I can check if it's NULL and otherwise set a value to it. But I don't know if it's possible, since ...
Hi guys,
I have the following code for creating an NSString to contain the body of the text file and then convert it to NSData and output it to a file.
NSString *particleString = [[NSString alloc] initWithFormat:@"%@", @"This is the body of my file"];
NSData *metaVals = [particleString dataUsingEncoding:NSISOLatin1Stri...
By default, a UITableViewCell instance positions the label pair textLabel/detailTextLabel in the center of its parent view. I prefer to have the pair aligned to the top of the cell. How do I do that programmatically?
Thanks,
Doug
...
Hi all,
I am starting to have a look at Core Data, as many claiming is the best way to persist data.
I have an already working project with its model and objects, the main purpose of the application is to encapsulate things as attributes (NString,NSObject, Custom Object..ecc) into one main class, give the ability to create many instanc...
Hi,
I have defined a constant array in one of my classes as:
static const float values[] = {-0.5f, -0.33f, 0.5f, -0.33f, -0.5f, 0.33f,};
In the dealloc method of my class, do I need to free the memory occupied by this field? How do I do it? Should I use NSArrays instead?
...
Here's how I start the code:
m_searchTimer = [[NSTimer timerWithTimeInterval:0.5 target:self selector:@selector(launchRequest:) userInfo:nil repeats:FALSE] retain];
[[NSRunLoop mainRunLoop] addTimer:m_searchTimer forMode:NSDefaultRunLoopMode];
then in my -(void)launchRequest method:
- (void)launchRequest:(NSTimer *)timer
{
ASIHTT...
Hi there, I'm pretty new to iPhone development.
I am building an app which has multiple views and controllers. There is only one model.
I need to share the model amongst all of the controllers; so I have instantiated the model inside the App Delegate header file:
@interface MyAppDelegate
(...snip...)
@property (nonatomic, retain) Cal...
Can you guys help me converting this C# code to Objective-C?
I don't have a clue about C#/Visual Studio!
public static class BezierSpline
{
public static void GetCurveControlPoints(Point[] knots,
out Point[] firstControlPoints, out Point[] secondControlPoints)
{
int n = knots.Length - 1;
// Calculate first ...
Are there any well-designed, general purpose decision tree implementations for iPhone or Java? I know with LINQ it would be quite trivial, but with Objective C and Java, it would be much more complex.
Basically, I want to drill down a set of objects based off any number of qualifications or attributes in my apps.
...
In my app, I am trying to save and retrieval of an image in core data. I am able to save an image successfully after convention of UIimage into NSData, But when I am trying to get an image as NSData it shows output as given below,
case 1: When trying to display as a string from DB.
<Event: 0x5b5d610> (entity: Event; id: 0x5b5ce30 <x-...
I have a program where we are using a navigation controller and need the app to launch to one of two different views. Basically if certain info has previously been entered then we need the app to launch to view A, but if the info has never been entered then we need it to launch to view B. I am having difficulty getting this to work and a...