Search Results

Search found 4528 results on 182 pages for 'touch'.

Page 15/182 | < Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >

  • how to create a rounded transparent rectangle by using cocoa touch ?

    - by srikanth rongali
    Hi, I need to create a rounded rectangular box in which there will be 6 buttons in iPhone application. And the rectangular box is transparent. Each button have an image and text. And they are also transparent. ( Here transparent means we can see the background image of the box. Sorry for my vocabulary.) I could not get how to start it. I thought of the following one but, By using core graphics draw the outside rounded rectangle and then draw inside rectangles like 2x3 grid. Can I make with this ? Are there any good and easy methods than this. Please give me some idea how to start over with ? Thank you.

    Read the article

  • How do I convert RGB into HSV in Cocoa Touch?

    - by Evelyn
    I want to set the background color of a label using HSV instead of RGB. How do I implement this into code? Code: //.m file #import "IBAppDelegate.h" @implementation IBAppDelegate @synthesize label; { self.label.backgroundColor = [UIColor colorWithRed:1.0f green:0.8f blue:0.0f alpha:1.0f]; }

    Read the article

  • Cocoa & Cocoa Touch. How do I create an NSData object from a plain ole pointer?

    - by dugla
    I have malloc'd a whole mess of data in an NSOperation instance. I have a pointer: data = malloc(humungous_amounts_of_god_knows_what); uint8_t* data; How do I package this up as an NSData instance and return it to the main thread? I am assuming that after conversion to an NSData instance I can simply call: free(data); Yes? Also, back on the main thread how do I retrieve the pointer? Thanks, Doug

    Read the article

  • How to enable camera feature in a sencha touch application using phonegap?

    - by Fabre
    I have developed one application in sencha touch2. I want to design a page in such a way that The page has a default image and one button below that. By clicking that button device camera should open(device mainly iPad and iPhone) and after capturing the image lets see it stored in a folder named as "capture" in your device. Then that captured image should replace that default image. I want to use Phonegap compulsorily. I have seen phone gap APIs for camera but I don't get it how to use it exactly. I am using MAC and Xcode for development.

    Read the article

  • How do I add a fullscreen view in Cocoa touch?

    - by David
    Hello :) Inside the titleView of a UINavigationBar, there is a button. Clicking it should slide in a view from the top of the screen. Where do I have to place the view so it's displayed fullscreen and not only inside the current UIViewController's contentView? Is there a function for adding fullscreen views?

    Read the article

  • When we should use NSThreads in a cocoa Touch ?

    - by srikanth rongali
    I am writing a small game by using cocos2d. It is a shooting game. Player on one side and enemy on other side. To run the both actions of player shooting and enemy shooting do we should use threads ? Or can we do without using them. At present I am not using threads. But I can manage to do both actions of player and enemy at same time. Should I use threads compulsory good performance ? Or am I doing wrong without using threads ? Please help me from this confusion. Thank you.

    Read the article

  • Proper method to detect device model (iPhone/iPod Touch)?

    - by Mark
    Is this the proper way to detect which device a user is running? NSString *currentModel = [[UIDevice currentDevice] model]; if ([currentModel isEqualToString:@"iPhone"]) { // The user is running on iPhone so allow Call, Camera, etc. } else { // The user is running on a different device (iPod / iPad / iPhone Simulator) disallow Call. }

    Read the article

  • Enabling multitouch on an acer 5742?

    - by Ben
    I am trying to get multitouch to work on my touchpad. I am currently trying to run a script to get it to work. It is set to start on boot, saved as .run and has been made executable. here is the code: #!/bin/bash #enable multitouch sleep 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Two-Finger Scrolling" 8 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Scrolling" 8 1 1 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Pressure" 32 10 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Two-Finger Width" 32 8 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Edge Scrolling" 8 0 0 0 xinput set-int-prop "SynPS/2 Synaptics TouchPad" "Synaptics Jumpy Cursor Threshold" 32 110 synclient TapButton2=2 exit the commands make multi touch work if I enter them in the terminal, but the script itself does not work. any suggestions?

    Read the article

  • Drag Gestures - fractional delta values

    - by Den
    I have an issue with objects moving roughly twice as far as expected when dragging them. I am comparing my application to the standard TouchGestureSample sample from MSDN. For some reason in my application gesture samples have fractional positions and deltas. Both are using same Microsoft.Xna.Framework.Input.Touch.dll, v4.0.30319. I am running both apps using standard Windows Phone Emulator. I am setting my break point immediately after this line of code in a simple Update method: GestureSample gesture = TouchPanel.ReadGesture(); Typical values in my app: Delta = {X:-13.56522 Y:4.166667} Position = {X:184.6956 Y:417.7083} Typical values in sample app: Delta = {X:7 Y:16} Position = {X:497 Y:244} Have anyone seen this issue? Does anyone have any suggestions? Thank you.

    Read the article

  • XNA Drag Gestures - fractional delta values

    - by Den
    I have an issue with objects moving roughly twice as far as expected when dragging them. I am comparing my application to the standard TouchGestureSample sample from MSDN. For some reason in my application gesture samples have fractional positions and deltas. Both are using same Microsoft.Xna.Framework.Input.Touch.dll, v4.0.30319. I am running both apps using standard Windows Phone Emulator. I am setting my break point immediately after this line of code in a simple Update method: GestureSample gesture = TouchPanel.ReadGesture(); Typical values in my app: Delta = {X:-13.56522 Y:4.166667} Position = {X:184.6956 Y:417.7083} Typical values in sample app: Delta = {X:7 Y:16} Position = {X:497 Y:244} Have anyone seen this issue? Does anyone have any suggestions? Thank you.

    Read the article

  • Smoothing touch-based animation in iPhone OpenGL?

    - by quixoto
    I know this is vague, but looking for general tips/help on this, as it's not an area of significant expertise for me. I have some iPhone code that's basically an EAGL view handling a single touch. The app draws (using GL) a circle via triangle fan at the touch point, and moves it when the user moves the touch point, and re-renders the view then. When dragging a finger slowly, the circle keeps up and consistent with the finger as it moves. If I scribble my finger quickly back and forth across the screen, the rendering doesn't keep up with the touch motion, so you see an optical illusion of "multiple" discrete circles on the screen "at once". (Normal persistence of vision illusion). This optical illusion is jarring. How can I make this look more natural? Can I blur the motion of the circle somehow? Is this result the evidence of some bad frame rate issue? I see this artifact even when nothing else is being rendered, so I think this might just be as fast as we can go. Any hints or suggestions? Much appreciated. Thanks.

    Read the article

  • dialing on iphone/ipod touch not working with documented procedures

    - by dave
    I'm trying to set up an iphone app to the phone number of a various sports store using the tel:// url passing method- I am developing on an ipod touch- usually on the touch you see the error message "Unsupported URL - This URL wasn't loaded tel://99887766" when you try and dial a number. I cant get this message to appear on the simulator or the ipod touch. do I need to do some sort of fancy signing before the app will dial properly? I am using this code: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", [selectedBar phoneNumber]]]]; and I've tried adding the slashes: [[UIApplication sharedApplication] openURL:[NSURL URLWithString:[NSString stringWithFormat:@"tel://%@", [selectedBar phoneNumber]]]]; but neither work. I have also tried this way: [[UIApplication application] openURL:[NSURL URLWithString:@"tel://99887766"]]; and this way: NSMutableString *phone = [[@"+ 12 34 567 89 01" mutableCopy] autorelease]; [phone replaceOccurrencesOfString:@" " withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; [phone replaceOccurrencesOfString:@"(" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; [phone replaceOccurrencesOfString:@")" withString:@"" options:NSLiteralSearch range:NSMakeRange(0, [phone length])]; NSURL *url = [NSURL URLWithString:[NSString stringWithFormat:@"tel:%@", phone]]; [[UIApplication sharedApplication] openURL:url]; No matter what i do i can't get any response from the simulator / ipod touch that it is dealing with a phone number- When I press the button associated with this code, it doesnt crash, it's like its processed it and decided not to do anything. i even put an NSLog(@"button called"); in just before the code to confirm the button was working, which it is.

    Read the article

  • How to track the touch vector?

    - by mystify
    I need to calculate the direction of dragging a touch, to determine if the user is dragging up the screen, or down the screen. Actually pretty simple, right? But: 1) Finger goes down, you get -touchesBegan:withEvent: called 2) Must wait until finger moves, and -touchesMoved:withEvent: gets called 3) Problem: At this point it's dangerous to tell if the user did drag up or down. My thoughts: Check the time and accumulate calculates vectors until it's secure to tell the direction of touch. Easy? No. Think about it: What if the user holds the finger down for 5 minutes on the same spot, but THEN decides to move up or down? BANG! Your code would fail, because it tried to determine the direction of touch when the finger didn't move really. Problem 2: When the finger goes down and stays at the same spot for a few seconds because the user is a bit in the wind and thinks about what to do now, you'll get a lot of -touchesMoved:withEvent: calls very likely, but with very minor changes in touch location. So my next thought: Do the accumulation in -touchesMoved:withEvent:, but only if a certain threshold of movement has been exceeded. I bet you have some better concepts in place?

    Read the article

  • How do I check to see if my subview is being touched?

    - by Amy
    I went through this tutorial about how to animate sprites: http://icodeblog.com/2009/07/24/iphone-programming-tutorial-animating-a-game-sprite/ I've been attempting to expand on the tutorial by trying to make Ryu animate only when he is touched. However, the touch is not even being registered and I believe it has something to do with it being a subview. Here is my code: -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event{ UITouch *touch = [touches anyObject]; if([touch view] == ryuView){ NSLog(@"Touch"); } else { NSLog(@"No touch"); } } -(void) ryuAnims{ NSArray *imageArray = [[NSArray alloc] initWithObjects: [UIImage imageNamed:@"1.png"], [UIImage imageNamed:@"2.png"], [UIImage imageNamed:@"3.png"], [UIImage imageNamed:@"4.png"], [UIImage imageNamed:@"5.png"], [UIImage imageNamed:@"6.png"], [UIImage imageNamed:@"7.png"], [UIImage imageNamed:@"8.png"], [UIImage imageNamed:@"9.png"], [UIImage imageNamed:@"10.png"], [UIImage imageNamed:@"11.png"], [UIImage imageNamed:@"12.png"], nil]; ryuView.animationImages = imageArray; ryuView.animationDuration = 1.1; [ryuView startAnimating]; } -(void)viewDidLoad { [super viewDidLoad]; UIImageView *image = [[UIImageView alloc] initWithFrame: CGRectMake(100, 125, 150, 130)]; ryuView = image; ryuView.image = [UIImage imageNamed:@"1.png"]; ryuView.contentMode = UIViewContentModeBottomLeft; [self.view addSubview:ryuView]; [image release]; } This code compiles fine, however, when touching or clicking on ryu, nothing happens. I've also tried if([touch view] == ryuView.image) but that gives me this error: "Comparison of distinct Objective-C type 'struct UIImage *' and 'struct UIView *' lacks a cast." What am I doing wrong?

    Read the article

  • touchesBegan and other touch events not getting detected in UINavigationController

    - by SaltyNuts
    In short, I want to detect a touch on the navigation controller titlebar, but having trouble actually catching any touches at all! Everything is done without IB, if that makes a difference. My app delegate's .m file contains: MyViewController *viewController = [[MyViewController alloc] init]; navigationController = [[UINavigationController alloc] initWithRootViewController:viewController]; [window addSubview:navigationController.view]; There are a few other subviews added to this window in a way that overlays navigationController leaving only the navigation bar visible. MyViewController is a subclass of UIViewController and its .m file contains: - (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"ended\n"); } } -(void)touchesBegan:(NSSet *)touches withEvent:(UIEvent *)event { for (UITouch *touch in touches) { NSLog(@"began\n"); } } I also tried putting these functions directly into app delegate's .m file, but the console remains blank. What am I doing wrong?

    Read the article

  • Detect if touch device

    - by Kilnr
    Hello, I'm writing a MIDlet using the Kuix UI toolkit, and I want to make changes to the toolkit depending on whether the current device is a touch screen device. (These changes include making buttons bigger, for easier tapping.) Is there a way to detect whether the device has a touch screen using J2ME (MIDP 2)? [edit] as a (crappy) workaround I check for the screen height instead. A screen width a height of higher than 240 is likely a touch screen... Please let me know if there are any more effective ways.

    Read the article

  • Touch event missing when pushing new view

    - by Milu
    Hello, I am new in iPhone programming. At the moment I am trying to recognize a constant touch. For example I want the user to leave his finger on the screen for the whole application. I use a navigationcontroller which holds the different views. If the user now touches the screen in view1 and then the view is changed to view2 by pushing it on the stack (with pushviewcontroller) with still touching the screen then there are no touch events recognized by view2. If the user then releases his finger (no touch event) and touches the screen again then all events are recognized. Is this a bug or am I doing something totally wrong? I haven't found any answer on this. Could someone help me?

    Read the article

  • Jquery canvas touch count

    - by user897764
    Can someone help me with a script I'm working with. http://jsfiddle.net/InVAMPED/XsG4e/4/ What I'm trying to achieve is placing a image where the user touches(ipad). There will be say 5 images that will each get attached once only. So first touch places img1, second touch imag2 etc untill all the images have been placed. Problem with my fsfiddle example is that when on ipad it doesnt count the first touch so you place the first image twice. it does duplicate the image on the second time just moves it to the second touches coordinates, then move on to 2, 3, 4, 5 as it should. any advice? or help to do this a better way? thanks

    Read the article

  • touch /forcefsck not working on Fedora16

    - by Harry
    I need to run fsck in order to repair my one and only hard-disk. I have no rescue CD/USB available. I did the following: touch /forcefsck chmod a+rw /forcefsck # just to be really sure reboot But no fsck happened on reboot, though the /forcefsck file quietly disappeared (why BTW?)! I saw some responses on the Net suggesting a shutdown -rF to auto-run fsck on reboot, but the shutdown I have on my F16 does not have any -F option.

    Read the article

  • Mail.app does not show new mail when iPod touch is active

    - by Debilski
    I have synchronised the e-Mail settings of the iPod touch with the settings of my IMAP account in Mail.app. Now sometimes the iPod would show there are new mails with Mail.app totally ignoring their existence for hours. Only when Mail.app is restarted would these new mails show up. Is there anything I can do that Mail.app is up-to-date even though the iPod is running?

    Read the article

  • Convert videos to iPod touch friendly formats

    - by joshhunt
    I have a bunch of Xvid videos lying around and I would love to convert them to a format that will play on my iPod touch efficiently and quickly. What free programs can do this? Although I am after something to run on Leopard, Windows programs wouldn't be bad either.

    Read the article

< Previous Page | 11 12 13 14 15 16 17 18 19 20 21 22  | Next Page >