Hi all,
I have 2 scenarios and I want to know which way is correct and better?
-(Employee*) getCustomEmployee{
Employee *emp = [[Employee alloc]init]; // no autorelease here
//do something with emp
return emp;
}
-(void) process{
Employee *emp = [self getCustomEmployee];
//do something with emp
[emp release]; //rel...
Hi all,
I want to clarify whether there is a memory leak in this code? As far as I feel its there.
in .h file
@interface MyClass{
NSMutableArray *dataArray;
}
@property(nonatomic,retain) NSMutableArray *dataArray;
in .m file
-(id) init{
self. dataArray = [[NSMutableArray alloc]init];
}
-(void) dealloc{
...
I'd like to build a preferences screen in my iOS app that has a segmented control at the top and, depending on its state, it will determine which sliders and switches are visible, as well as where they're positioned. When you change the state of the segmented control and the layout of the screen changes, I'd like it to animate smoothly ...
Hi eveybody.
I have an iPad application which implements the UISplitViewController. As usual I'm using the popover button to show the root view when the device is in portrait mode.
It's seems to be ok at time of launch, but if I turn the device to landscape, then back to portrait, the table in the popover, will have an additional blank r...
Hey guys, i have a simple app just a load of images in one image view. Each is just included in a plist file and called when a cell is selected in popover window. All i want is a button with an action to get next item in plist and display in the image window. this sounds easy but i cant figure out the code to grab next item in plist? can...
I want to build a multiplayer iPhone game that allows multiple iPhones (clients) to connect to a single iPad (server) using Bonjour. Since I only have one iPhone and one iPad, is there a way to run multiple instances of the iPhone simulator to simulate the multiplayer app?
If not, does anyone have any creative solutions to testing a mul...
I'm diving into iOS development and I find that for each of my UI controls, I always just blindly declare their @property like so, since that's how it was done in some tutorial I read when I started learning...
@property (retain, nonatomic) IBOutlet UILabel *lblStatus;
I'm still getting familiar with these attribute types and what the...
I am developing my first iPad app using the iOS SDK 4 and Xcode 3.2. I have written a simple Hello World and have been able to run it in the iPhone simulator. I would like to figure out:
How can I get an iPad simulator?
Is it possible to test my app on my actual iPad without signing up for a developers license for $99?
Thanks,
Mik...
Do I have to "release" my UI objects that I declared as IBOutlets with property attributes "retain" and "nonatomic"? I ask because I have a UI var declared as so...
@interface MyViewController : UIViewController
{
IBOutlet UILabel *lblStatus;
}
@property (retain, nonatomic) IBOutlet UILabel *lblStatus;
@end
and my dealloc like so....
I'm trying to make an application in cocos2d that can be used on multiple platforms (iPad, iPhone, iPod touch). Let's say I set a point to (360,160). The point would show up three fourths from the left and half way up the screen on the iPhone. Would it also do this on the ipad, or would I have to set the point to (768,384) to achieve thi...
I'm going nuts trying to see what I'm doing wrong with this...
I have an iPad app which runs only in landscape mode.
I have a UITabBarController which holds a webview:
[tabBarController setViewControllers:
[NSArray arrayWithObjects:browserController,
nil] animated:YES];
I have a UIButton that I want to be able to us...
I need to create an app that plays a video on the iPad. Is there a way that I can put an FLV (or any other files for that matter)on the iPad simulator so that I can test the app that will open the video file?
Thanks,
Mike
...
so I have implemented a 1-finger long-press gesture recognizer, but the recognizer always seems to be missing the UIGestureRecognizerStateBegan state...
If I long press w/o moving finger and lift, I get the StateEnded debug message.
If I long press and move finger a bit then lift, I get the StateChanged and StateEnded debug messages.
But...
I am new to Core Data and trying to think of the simplest and / or most performant way to implement a tags feature for items in Core Data. I am still wrapping my head around the fundamental differences between core data and the sql server I am used to.
Has anyone done this? Or have any suggestions of a solid implementation for this? ...
I am getting this error when I deploy to my iPad. It does not occur in the simulator.
My ipad app has three UIWebViews. The majority of this application is written completely as a web app, and uses CSS to make it look more native. Links that are clicked in the various web views will open in a certain one depending on the value of the re...
I plan to use ASIHttpRequest for downloading files from back-end server. Before actions, post questions here to know more about this feature.
As sample source codes given : ( demonstrate downloading remote JPG file )
ASIHTTPRequest *request;
request = [ASIHTTPRequest requestWithURL:[NSURL URLWithString:@"http://allseeing-i.com/ASI...
I've hooked up a UITapGestureRecognizer to a UIImageView containing the image I'd like to display on an iPad screen and am able to consume the user taps just fine. However, my image is that of a hand on a table and I'd like to know if the user has tapped on the hand or on the table part of the image. I can get the x,y coordinates of th...
Hi.
I have a problem with a UIScrollView.
I set its frame.size, contentSize (bigger then frame), but I still can't scroll.
My program has sctucrure like this:
MainMenuViewController -> ScrollBarController -> UIScrollView
This is a part of MainMenuViewController's method viewDidLoad
ScrollBarController *imgScrollBarCtrl = [[ScrollBarC...
What is the most commonly used technology for communicating between an application running on an iPad and one on an iPhone? For example, the famous Scrabble application uses device-to-device communication to host the game board on the iPad and the letters on the iPhone.
...
Is it possible to replace Copy/Select popover when selecting text in UITextView?
When text is selected, I want my own view to pop over.
...