I'm trying to let a player tap, drag and release a card from a fanned stack on the screen to a 4x4 field on the board. My cards are instantiated from a custom class that inherits from the UIImageView class.
I started with the Touches sample app, and I modified the event handlers for touches to iterate over my player's card hand instead ...
Hi,
I want to get amount of taps anywhere on the screen.
Here is my code:
-(void) touchesEnded: (NSSet *)touches withEvent: (UIEvent *)event
{
DebugLog(@"touches: %d", [touches count]);
}
This method is implemented in an active view controller.
But it doesn't detect multiple taps - it reports me them as a single tap.
How can I...
Code :
NSString *path = [[NSBundle mainBundle] pathForResource:@"sample" ofType:@"m4v"];
MPMoviePlayerController *video = [[MPMoviePlayerController alloc] initWithContentURL:[NSURL fileURLWithPath:path]];
[video setBackgroundColor:[UIColor blackColor]];
video.scalingMode = MPMovieScalingModeAspectFill;
[[ NSNotificat...
here is the code I am referring to:
NSArray *views = [[NSArray alloc] initWithObjects:addPVC, nil];
UITabBarController *aTBC = [[UITabBarController alloc] initWithNibName:nil bundle:nil];
self.initialTBC = aTBC;
initialTBC.viewControllers = [NSArray arrayWithObjects:aController, aController2, nil];
[self.view addSubview:initialTBC....
Memory leak problem - NSConcreteData
// to set tip - photo in photo frame
NSData *data=[NSData dataWithContentsOfURL:[NSURL URLWithString:pathOfThumbNail]];
UIImage *cellThumbImg;
if([data length]>0){ cellThumbImg=[UIImage imageWithData:data];} else { cellThumbImg=[UIImage imageNamed:@"130X90.gif"]; }
UIImageView *imgView=[[UIImage...
I have photos on my Mac that I would like to add to the iPhone Simulator to test my application.
In other words: how do I add photos to the iPhone Simulator?
Edit : What about iphone Simulator 4.0 ? iphone Simulator 3.0 & 4.0 both working differently.
Thanks in advance for helping me...
...
I've been trying out some of the view code from Erica Sadun's book "The iPhone Developer's Cookbook" and found some code I don't understand. Here's the code for a loadView method:
- (void)loadView
{
// Create the main view
UIView *contentView = [[UIView alloc] initWithFrame:
[[UIScreen mainScreen] applicationFrame]];
contentView.b...
I finished building an app that allows beaming of photos, contacts and text clips over Wi-Fi
IPhone to IPhone and IPhone to desktop.
I want to decide on the feature set of the lite version of my IPhone app. I also want to come up with a pricing model. So the question is, which of these components should be free, and for which I should...
The console only says this, and the app won't get past Default.PNG without crashing
*** Terminating app due to uncaught exception 'NSUnknownKeyException', reason: '[<Simple_RSSAppDelegate 0x5248d0> setValue:forUndefinedKey:]: this class is not key value coding-compliant for the key viewController.'
2009-08-08 22:23:54.135 Simple RSS[1...
If I do this:
@interface RegisterController : UIViewController <UITextFieldDelegate>
{
IBOutlet UITextField *usernameField;
}
instead of this:
@interface RegisterController : UIViewController <UITextFieldDelegate>
{
UITextField *usernameField;
}
@property (nonatomic, retain) IBOutlet UITextField *usernameField;
Will somethi...
Hi All
i want to create view like, i have more than 20 icons on top and i want to chose icons with horizontal scroll but i am very much concerned about how to create horizontal scroll view in my application.
i appreciate your time , please help me on this with any examples.
...
Hi, i'm only create an project with a Utility Application template.
This template has a native memory leak when i push "info button" to
flip the view.
Anyone know how can i fix this leak ???
I just make an new project from this template,
i don't add new objects.
...
I have a really weird problem with UIImageView. I have an image (an RGB png) 45x45 pixels which I add to the view. I can see that image is blurred after added to the view. Here is the same image in the simulator (left) and in Xcode (right):
I have custom UIImageView class with this initWithImage code:
- (id) initWithImage:(UIImage*) ...
I have a bug I'm struggling to track down. I believe what's happening is that I'm deleting an object from the underlying database whilst another managed object context (in another thread) has a fault on it and gets the 'NSObjectInaccessibleException' when it tries to fulfil the fault.
The scenario is that I have a view accessing the dat...
I'm having a little dilemma with an iphone project.
I'm getting some JSON data from a webservice. I can deserialize it into a dictionary OK. One of the dictionary values is a binary (a picture), but my JSON library deserializes it as an NSArray of NSDecimalNumbers!
How do I convert this NSArray of NSDecimalNumbers to an NSData object, ...
Hi all,
I'm looking for a small tutorial that can help me use svg images in iphone application. I'm trying to learn about svg format, and would love to know if there is relevant material from apple out there? particularly, w.r.t. iPhone.
Are there any open source libraries, or frameworks in iPhone SDK 3.0+ for SVG?
Any help is appreci...
I am making a simple iPhone drawing program as a personal side-project.
I capture touches event in a subclassed UIView and render the actual stuff to a seperate CGLayer. After each render, I call [self setNeedsLayout] and in the drawRect: method I draw the CGLayer to the screen context.
This all works great and performs decently for d...
I currently open an https connection to a web server using NSURLConnection. Everything works as it should and I am able to retrieve the page content I am after. The certificate is issued by VeriSign and I assume NSURLConnection does some work to verify the authenticity of the certificate to some extent? If I connected to the same website...
I'm a little ways into developing my first iphone app, and I've been running into exc_bad_access a lot. (I'm sure it's because I'm not designing stuff in a very MVC-proper way yet.)
It's extremely frustrating trying to hunt down why I'm running into these errors all the time... is there a way in the xcode debugger to keep a watch list ...
After a login screen which sends the username/password to a webservice and gets back a response of either true(which is supposed to start the rest of the app) or false(incorrect username/password or unauthorized). The app gives the alert view that you are authenticated but it doesnt load the rest of the view?
if ([soapResults isEqualToS...