Could someone please help me understand reference counting in Objective C properties.
Suppose I have class
@interface TA : NSObject
{
TB* tb;
}
- (id) init;
- (void) dealloc;
@property (nonatomic,retain) TB* tb;
@end
@implementation
@synthesize tb;
- (id) init {...}
- (void) dealloc {...}
@end
My understanding is that assignment...
How do you set the title of an UIPopOver View programmatically?
I found some sample code but wasn't able to set the title.
myView *theView = [[myView alloc] initWithNibName:@"myView"
bundle:nil];
UIPopoverController* aPopover = [[UIPopoverController alloc] initWithContentViewController:theView];...
Hello,
I want to add some carousel effect in my iphone application. i want to show some items in carousel effect. so can any one suggest how i do this ?
Thanks
...
I would like to skip through a movie using a slider (which I have successfully implemented) and believe the only option is to use the initialPlaybackTime property. I've found that to use this I need to first stop and start the video. This is a problem as I have events firing during the movieDidFinish event which I dont want to fire when...
In Objective-C you can pass a method A as a parameter of other method B.
and call method A from inside method B
very easily like this:
-(void) setTarget:(id)object action:(SEL)selectorA
{
if[object respondsToSelector:selectorA]{
[object performSelector:selectorA withObject:nil afterDelay:0.0];
}
}
Is there any functiona...
in my app I have a table view where I download a list of hotels parsed by an XML(for every hotel i put in xml an attribute STARS); I need to view hotels by stars (from 5 stars to three stars), dividing it into three sections.
So I have a section "5 stars" where there are 5-star hotel, a section "4 stars" where there are the 4-star hotel ...
how to find whether a particular application already exists in iphone through code
...
Hi, I am handling a camera that needs different parameters in different architecture, Is there a flag that I can check to see if I am in 32bits or 64bits in my mac?
I was trying this but does not seem to work, I always get 32Bits!! :
#if defined(PER_ARCH_CFLAGS_x86_64)
NSLog(@"64bit!!");
#else
NSLog(@"32Bits!!");
#endif
...
Hi there,
I've got mask images w/o alpha channel, pure black and white with a black polygone on the center sourrounded by white.
I've got png's image that I'd like to mask. the png have got an alpha channel.
using the method here below : ok on simulator, but background is black on device ...
any idea to fix that ?
- (UIImage*) maskIm...
Hi,
I want to generate unique file paths in Objective-C. I looked at NSTemporaryDirectory() but the closest I could get was to this and this. But in the second one they create such a file. I do not want to create it, I just want an NSString for a unique writable path... I don't need paths to folders, just files. How is this possible?
...
Could someone please direct me to some sample code that demonstrates how to send SMS from the iPhone.
...
I want to know about categories and Protocol with example for objective-c
...
I have a background thread that goes off to a server and gets XML which then renders it to a graph.
I have an NSTimer which fires off a request every 5 seconds, what is typically the best way to stop the execution of a thread altogether (if at all possible), I know you can subclass NSInvocationOperation and implement the cancel method, ...
Hi! I am new to this field, presently i am on an application in which i'm parsing the data from xml file in my xml file there is a date (yyyy-mm-dd format), time (hh:mm format). i took some variable in application to store them like NSDate for date from xml and NSString for time purpose. i need that if i select some date from UIPickerVie...
Possible Duplicate:
How to programmatically send SMS on the iPhone?
how to develop/code an application which could send sms from iphone with text in it.
...
Hi all,
I am new in iphone,in my app required data from the server.
1)mysql database uploaded on the server
2)With the help of php code i fetch the data from the server
problem is that how i integrate php in my iphone please solve my problem,
give any reference.
Thanks,
...
I am learning to use Core Data. I have created a data model etc and have been inserting items using NSManagedObjectContext and NSManagedObject.
I have noticed something though - I didn't have to create any db.
So why question is - when I create the data model - is that actually creating the db i.e. is that all there is to it? It seem...
Hi there,
My iPhone application occasionally crashs the first time it is run after being installed. After this every time i try and run the app it remains on the splash screen or even a black screen until eventually it dies. I have to restart the device to get the application to work. After this it works fine every time. The only change...
Hi guys, I have this very strange problem, I'm new to objective-c and it probably comes from depths which I don't comprehend yet.
So, in my header file I declare the variable
NSString *curTitle;
then in .m file I synthesize it:
curTitle = [[NSString alloc] init];
after that in other method I assign it:
curTitle = string; // strin...
Holy Crap! Really... I'm frustrated with this problem that get me stuck with my apps for a week now.
Here is the code
- (IBAction)loadTheImage {
UIImagePickerController * picker = [[UIImagePickerController alloc] init];
picker.delegate = self;
picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary;
// picker.sourc...