this is my code and it works flawless, where my_value is a string with separator ','.
everythign works fin but i'd like to display the person record from the address book after i saved it, so in the function
if(isSaved) {
// **** code here ***
}
here the complete function
- (void) addToAgenda: (NSString*) my_value{
...
I have a huge map image (8192x6144px) which I'd like to display at scales ranging from 1x to 0.1x. At 1x this is about 24 mb using PVR 4-bpp compression--a little too much. So I'd like to load them at varying resolutions, depending on the map scale.
Does mipmapping accomplish what I need, which is to load/unload levels of mipmaps based...
[[NSUserDefaults standardUserDefaults] setObject:myArray forKey:@"myArray"];
If I make an array of custom objects conform to the NSCoding protocol, then does the above work? Do I have to make both the custom class and the view controller that holds the array of custom objects conform to the NSCoding protocol or just the custom class? D...
I saved an array using the following code:
NSData *data = [NSKeyedArchiver archivedDataWithRootObject:myArray];
[[NSUserDefaults standardUserDefaults] setObject:data forKey:@"myArray"];
What is the code to load it back into memory?
...
How do you know if you need to use NSArchiver or NSKeyedArchiver? What's the difference?
...
I have an object. It has only two NSStrings as properties.
I created an array to hold several of these objects.
Do I need to use NSKeyedArchiver to save this array to disk, or can I just use NSUserDefaults?
...
Let's say I create an object like this:
Person:
NSString *name;
NSString *phone;
NSString *address
I create several of these objects. Then I create an NSMutableArray called people and store them in there.
Can I save this array to disk with Array writeToFile? Does it need to be converted to NSData?
...
Is the parameter for NSKeyedArchiver archivedDataWithRootObject: supposed to be the array I am trying to save, or the array converted into NSData?
...
Let's say I saved data to disk like this:
[[NSUserDefaults standardUserDefaults] setObject:[NSKeyedArchiver archivedDataWithRootObject:theArray] forKey:@"savedArray"];
How can I erase that from disk?
...
I made a class. This is the h file.
// MyClass.h
#import <Foundation/Foundation.h>
@interface MyClass : NSObject <NSCoding> {
NSString *string1;
NSString *string2;
}
@property (nonatomic, retain) NSString *string1;
@property (nonatomic, retain) NSString *string2;
@end
This is the m file.
// MyClass.m
#import "MyClass.h"...
Hey all, I have a selector that searches the mainBundle for all .aif files, and allows the user to select them. This works fine, but then I removed some of the files from the project and folder, yet they did not disappear. Is there any way to maybe recompile it or something because It's now plagued with sound files that I don't need.
Th...
I know that you use @synthesize to create setter and getter methods, which makes things easier because then you don't have to write your own.
There are certain places where you have to use self.property instead of just property in order to make use of the setter and getter methods, such as in dealloc and initWithCoder.
This tells me th...
Hi
I would like for my section header to display the sum of the values in my rows.
I therefore implement the:
- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section
delegate function and place a UILabel in the custom view I build here.
If this were a UITableViewCell I would build the cell if it did ...
How do you pass an object to a view controller, right before you push the view to show it?
...
For the UIImage resize I used the following class.
http://iphone.svn.wordpress.org/trunk/UIImage+Resize.m
But I am having issues in some iPhone orientation where I keep the phone in lined with a vertical surface. It does the resize properly but the image is not properly affine transformed. The image orientation is different. I logged t...
An example:
Thanks in advance!
Sagiftw
...
If you synthesize a custom class, do getters and setters get created for it?
This is the custom class I created.
// MyClass.h
#import <Foundation/Foundation.h>
@interface MyClass : NSObject <NSCoding> {
NSString *string1;
NSString *string2;
}
@property (nonatomic, retain) NSString *string1;
@property (nonatomic, retain) NSS...
I made a class. This is the h file.
// MyClass.h
#import <Foundation/Foundation.h>
@interface MyClass : NSObject <NSCoding> {
NSString *string1;
NSString *string2;
}
@property (nonatomic, retain) NSString *string1;
@property (nonatomic, retain) NSString *string2;
@end
This is the m file
// MyClass.m
#import "MyClass.h"
...
Typically when creating an action from something like a button you have this
[button addTarget:self action:@selector(method:)...
I can guess if I want to send the action to another class but what if I want to send it to the parent? I thought super might work but that gives a warning.
EDIT:And super crashes the App
Cheers for any hel...
Hi,
I'm having an immense amount of trouble figuring out how to populate a Grouped UITableView with custom UITableViewCells. Could anyone point me towards a tutorial on how one might do this? Or does anyone have an example of what a cellForRowAtIndexPath method would look like when creating a Grouped UITableView with custom UITableViewC...