Sometimes I need instantiate CoreDateEntity to store some infomations for temporarily using.
But I needn't it be stored into DB.
currently I created a similar class which have same structures as the CoreDateEntity does.
It works well but I have to do many datas transfer between Two models.
Is there any better way to handle this?
Tha...
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSMutableArray *componenti = [parser
objectWithString:@"[\"Item1\",\"Item2\"]"];
NSAssert([componenti isMemberOfClass:[NSMutableArray class]],@"err");
This code gives me an assertion failed. What is wrong?
The header file says:
@brief The JSON parser c...
I am work on a simple program in which I split a string and a user global, I use the following code for splitting the string.
NSString *GlobleStr;//globale variable
//===============
NSString *xmlParsingResult=@"Apple,iphone";
NSArray *array = [xmlParsingResult componentsSeparatedByString:@","];
NSString *StrResult = [NSString stri...
I'm using the Kal calendar. For the code shown below I'm referring to the Holiday example. In this example the allocation and initialization of Kal is done in the applicationDidFinishLaunching in the AppDelegate. The UITableViewDelegate protocol (e.g. didSelectRowAtIndexPath) is also positioned in the AppDelegate class.
The AppDelegate:...
I'll appreciate if anyone can explain the logic behind protocol inheritance. e.g. what does the following mean (UITableView.h):
@protocol UITableViewDelegate<NSObject, UIScrollViewDelegate>
The following class implementation doesn't work. I have a class View1 (which inherits UIView), with an associated protocol. I have another class,...
I create an NSMutableArray:
SBJsonParser *parser = [[SBJsonParser alloc] init];
NSMutableArray *components = [parser objectWithString:@"[\"Item1\",\"Item2\"]"];
then I access it from the same method: no problem!
Then I try to access it from another object: crash!!??
It doesn't happen if i create the NSMutableArray with other means (e....
After a user tries to send some "in app" email from my iPhone app... I'd like to inform them of what happened.
I put some code like this in my "didFinishWithResult" method:
if(result == MFMailComposeResultSent ) NSLog(@"Email sent");
if(result == MFMailComposeResultCancelled) NSLog(@"Email cancelled");
if(result == MFMailComposeR...
Hi
I have this code, what am I doing wrong?
I have a function which I call playing a number of strings into an array. Then at some point I want to reload it after the user has edited the strings. This is the function:
NSMutableArray *lessonsFunc(id a, id b, id c, id d, id e, id f){
monData *mon = [monData sharedData];
return [...
The scifihifi-iphone project is a wrapper for the Apple Keychain. But it not documented enough.
For which iphone OS is this made? iOS 3?
What does the "UI" group do?
Do I need this?
How to use it?
Thanks in advance!
...
I have a UIView which i animate the movement of it's frame. However, now, i want to change the alpha value so its fades out as it moves... The alpha needs changing back at the end of the animation. My first thought was to use an animationDidStop Selector but, this View is only in scope where the animation block is... i.e. in the Stop sel...
Hello,
I have a module which can record a video using iphone camera... and can upload that video using FTP ?
I am unable to upload video file using FTP.
Any ideas ?
...
Hi there,
I am using CoreData and have an Entity ContactList defined, which I created using the XCode xcdatamodel tool (or whatever you call that built-in thing:). I also set the Entity's Class name to "ContactList". I then used rentzsch's mogenerator (http://github.com/rentzsch/mogenerator) to generate my custom class files and added t...
My app has various pins that drop onto a map and when you click on the pins you get more information about this entity.
Each time you click on the entity it retrieves the information from a web service. Should I only retrieve this information once and store it in memory or should I retrieve it each time that page loads?
It's a small a...
Hi, am working my way through the "Beginning iPad Development" Apress book and have noticed that sometimes when the author is assigning values to a property they will use:
self.variable = value;
and other times, they will use:
variable = [value retain];
In both cases variable is a property defined as:
@property (nonatomic, retain)...
I'm looking at this code:
NSMutableArray *controllers = [[NSMutableArray alloc] init];
for (unsigned i = 0; i < kNumberOfPages; i++) {
[controllers addObject:[NSNull null]];
}
self.viewControllers = controllers;
[controllers release];
Later on...
- (void)dealloc {
[viewControllers release];
...
}
I see that self.viewCon...
Hi guys,
i have a memory leak in my app.
My app launches on a tableviewcontroller. i parse a json file to fill an array. Then this array is used to fill the tableview's cells.
I fill my array with objects (class).
I do:
[tab_Demandes removeAllObjects];
for (NSDictionary *demandeD in demandes)
{
Demande *dem =[[Demande alloc] ini...
I have made a small test app with a button and a UISlider. Touching the button changes its label text.
I have added IBOutlet properties for both controls. I'm releasing all properties in viewDidUnload and also set them to nil in dealloc.
The interesting thing is now: I touch the button. Its tag is changed from "0" to "1" and, its text i...
Say I have a class like this:
@interface MyAwesomeClass : NSObject
{
@private
NSString *thing1;
NSString *thing2;
}
@property (retain) NSString *thing1;
@property (retain) NSString *thing2;
@end
@implementation MyAwesomeClass
@synthesize thing1, thing1;
@end
When accessing thing1 and thing2 internally (i.e, within the impleme...
Hi guys!,
i need some help:
i have several views (view xib): login, sign up, settings, and so on.
i have created a project, added a tab controller and the tabs are working fine.
The problem is that: we have 2 sign up 'ways' and my boss want them in two different tabs. The code is almost equal, so my idea is:
instead of hav...
I am looking to add a black label with a transparent background to my view (see below)
// ADD LABEL
UILabel *label = [[UILabel alloc] init];
[label setFrame:CGRectMake(124, 312, 72, 35)];
[label setText:@"Yay!"];
[label setTextAlignment:UITextAlignmentCenter];
[[self view] addSubview:label];
[label release];
When I add the label it al...