Search Results

Search found 19130 results on 766 pages for 'tariq iphone programmer'.

Page 27/766 | < Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >

  • Button outside view... how to make it work

    - by Mike
    I have a UIImageView based class that creates objects with the following characteristics: a small image square and a UITextView below. If the user drags the object by the image it can drag it around. If the user taps on the UITextView the keyboard has to appear and the user can change the text on it. The objects created by the class are like this: 1) the object creates a 60x60 pixels frame 2) puts an image inside that frame 3) creates a UITextView and puts it below that 60x60 frame. So, as the class is a UIImageView based and it creates an image with 60x60 pixels and the UITextView is located outside that area, in theory the text view is outside the area the tapping are for that object. Obviously I could make the class create a big square to encompass the image and the text view, but that frame would be too big and I have the objects created by this class to be as close as possible when I add them to another view. I could also create the text views from the same view I created the objects, but I would have to manage each object and each correspondent text view and I need them to move together... so, I have a problem. Any ideas on a simplest way to do that?

    Read the article

  • Is it possible to download a .zip file into iPhone when user clicks a link inside UIWebView?

    - by Horace Ho
    In a new app, I plan to let users download their own files and stored them inside iPhone. The process is typically: iPhone present a web page by UIWebView, in which there are several links to .zip files the user browser the page and click on one of the .zip file link iPhone downloads the file into the iPhone document folder, closes WebView, acknowledges the user when download is complete How can that be done? Thanks

    Read the article

  • wrong interface orientation or unknown

    - by Mike
    The problem is this: I put the simulator in landscape I start the app The app is unable to detect the correct orientation, always unknown! I have created a sample project that demonstrates the problem I have. Take it here How can I solve that? thanks

    Read the article

  • grabbing layer contents in a class

    - by Mike
    I have a custom UIImageView class that creates thumbnails (UIImageView) and each thumbnail has a label. The label is created by another class. The label class creates a UIImageView and a UITextView on top of it. This is the init object class' init method: - (id)initWithFrame:(CGRect)frame { if ([super initWithFrame:frame] == nil) { return nil; } CGRect myFrame = CGRectMake(0, 0, 100, 100); myLabel = [[myLabelClass alloc] initWithFrame: myFrame]; //myLabelClass is a UIImageView based class [myLabel setCenter:CGPointMake(50, 50)]; [self addSubview: myLabel]; return self; } So, I have this MAIN VIEW CONTROLLER | |___ UIImageView WITH LABEL | |____ label background (UIView) |____ UITEXTVIEW (text) Now I want to write the contents of all these 3 components to a quartz context. I need to write using drawInRect, because I need to write the full object to a precise location. I expected object.layer.contents to be the image equivalent to these 3 "layers" flattened, in other words, the object's image, the label background and the label text, as it would if I created these 3 objects in Photoshop and flatten the composition. I also expect object.myLabel.layer.contents to contains the rendered contents of the UITextView over the label background. The problem is that when I use UIImage *myImage = [UIImage imageWithCGImage:objecto.myLabel.layer.contents]; [myImage drawInRect:CGRectMake(0, 0, 100, 100)]; I get nothing. How can I obtain a "flattened" image resultant to the full object (including its subviews)? thanks

    Read the article

  • xcode - defining integer variables

    - by Mike
    If I have #define myVariable 10 and later I use this as in [self doSomething:myVariable]; Supposing doSomethign method is like - (void) doSomething:(int)myNumber; I receive a warning telling me that a "]" is expected before the ";" why is that and how to solve this? thanks for any help.

    Read the article

  • Simpler reachability ApI?

    - by Moshe
    I've downloaded the Reachability API and I'd like to know if there is a simpler version anywhere, or if someone can point out the bare-bones essential part of it, so that I don't need to add tons of files to my project. I don't need the whole API, I just need to check for any sort of connectivity, a particular host will be assumed available after that.

    Read the article

  • Using system Sound to play sounds

    - by Shoaibi
    Here is the code: -(void)stop { NSLog(@"Disposing Sounds"); AudioServicesDisposeSystemSoundID (soundID); //AudioServicesRemoveSystemSoundCompletion (soundID); } static void completionCallback (SystemSoundID mySSID, void* myself) { NSLog(@"completion Callback"); } - (void) playall: (id) sender { [self stop]; AudioServicesAddSystemSoundCompletion (soundID,NULL,NULL, completionCallback, (void*) self); OSStatus err = kAudioServicesNoError; NSString *aiffPath = [[NSBundle mainBundle] pathForResource:@"slide1" ofType:@"m4a"]; NSURL *aiffURL = [NSURL fileURLWithPath:aiffPath]; err = AudioServicesCreateSystemSoundID((CFURLRef) aiffURL, &soundID); AudioServicesPlaySystemSound (soundID); NSLog(@"Done Playing"); } Output: Disposing Sounds Done Playing In actual no sound gets play at all and completion call back isn't called as well. Any idea what could be wrong here? I want to stop any previous sound before playing current.

    Read the article

  • Initializing Detail View from nib with parameters passed from Root View

    - by culov
    I'm have a map view with a number of annotations on it... once the callout is clicked, i need to pass several parameters to the DetailViewController, so ive been trying to do this through the constructor. I've debugged a bit and discovered that the arguments are being passed properly and are being received as expected within the constructor, but for some reason whenever I try to change the values of the IBOutlets I've positioned in the nib, it never has an effect. Here's what im passing (btw, im getting a "No initWithNibName : bundle : header' method found" warning at this line): DetailViewController *dvc = [[DetailViewController alloc] initWithNibName:@"DetailViewController" bundle:nil header:headerText]; [self.navigationController pushViewController:dvc animated:YES]; Now heres my constructor: - (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil header:(UILabel*)headerLabel { if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { self.headerTextView = headerLabel; NSLog(@"header:%@", headerLabel.text); } return self; } Once again, the problem is that headerLabel.text is printed properly in the console, but the line self.headerTextView = headerLabel; doesnt seem to be doing what I want it to do. Thanks!

    Read the article

  • Storing unique ID in UITableViewCell

    - by culov
    I have a table where there will often be two cells with the same title. I'm zooming in on a map whenever a cell in the table is clicked, so using the title as a unique identifier is out of the question. I already have a unique identifier, but I need to find a way to store it in a UITableViewCell object. I have been considering two options, both of which are poor, IMO. 1) store the unique ID as the text inside the text of the detailTextLabel property. 2) build a custom UITableViewCell class. I'm new to objective C, and I would essentially like to know if theres a third option that isnt as inefficient as #1, but not as involved as #2. Thanks

    Read the article

  • Loading table sections when using headers

    - by Luis Tovar
    I cant seem to wrap my head around this. I have googled, and overstacked for hours now looking for examples that i can relate to. What I have is two arrays. The name of my first NSMutableArray is "showDates". I have 3 objects in here. Object 0: "Today, May 20th" Object 1: "Tomorrow, May 21st" Object 2: "Saturday, May 22nd" Then I have my second NSMutableArray named "showTimes" I have about 15 objects in there with strings in each object. ( i hope that makes sense? ) Each object is structured like this: Object 0: showID @"98022" eventID @"833" showTime @"1:30pm" showDate @"Today, May 20th" auditorium @"9" venue @"2991" Object 1: showID @"98222" eventID @"813" showTime @"2:30pm" showDate @"Tomorrow, May 21st" auditorium @"9" venue @"2991" Etc, etc, .... I have the headers working great in my tableView, but I cant seem to figure out how to add the objects in my "showTimes" array under the correct header. Any help would be greatly appreciated.

    Read the article

  • UIView added with incorrect orientation

    - by mx12
    So I have been working on a problem with UIView on the iPad. Essentially I have a splitview as the root view and I want to overlay my custom image view over top of the splitview (This is because the splitview must be the root view). The problem that I have, is when I call addSubview on my splitview the subview gets displayed in its default orientation, with no regard to the iPad's current orientation. Any suggestions on what I am doing wrong or flag I am not setting? Thanks! Code that I am using to add the view: [splitViewController.view addSubview: myImageController.view]; Example screenshots: http://www.engineering.uiowa.edu/~krtaylor/so/

    Read the article

  • size of an image

    - by Mike
    From times to times I have to know the width and height of images. I am using the following code: UIImage *imageU = [UIImage imageWithContentsOfFile:[[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"myImage.png"]]; CGFloat imageW = CGImageGetWidth(imageU.CGImage); CGFloat imageH = CGImageGetHeight(imageU.CGImage); My question is that if it is there any other way to know the width and height of an image, in pixels, without having to load the image on a variable, that's probably consuming memory. Can the dimensions be read from the file directly without loading the whole image? thanks.

    Read the article

  • coding on back button of navigation based application??

    - by hemant
    In one view during a function call i am assigning 1 to a flag...when i navigate back to previous view i want the the flag value to be retained to that view...how cAn i do coding on the button that appears on the screen to navigate back to the previous screen might be able to do it or is there any better solution???

    Read the article

  • using a button to navigate to different view in navigation based application??

    - by hemant
    i created a navigation based project but instead of tableview i added a new view with a button to navigate to the other view.. my button code is as shown below but whenever i run it the application doesn't run?? is the code wrong or navigation based application only work with tableview?? -(IBAction)clickMe:(id)sender chdDetails *details=[[chdDetails dalloc]initWithNibName:@"chdDetails" bundle:nil]; [self.navigationController pushViewController:details animated:YES]; [details release]; details=nil;

    Read the article

  • using a test account for in app purchases??

    - by hemant
    i created in app purchases in my application.But still my test account doesn’t work fine. When i test my application using test account the sandbox environment asks me to buy the product and after buying it asks me to buy the product again straightaway. Is it some problem while using test accounts or is there a problem in my coding?? this is my first application and figuring out in app purchases for your application can be really hard at times. i have 4 products and this happens only with 1 or 2 products and rest work fine. So i am sure the in app purchases is fine but cant figure out what could be wrong??

    Read the article

  • Two view App with root template view

    - by Tieman
    Hi I was wanted to do Application witch have a root template view with a nice logo on top or something adn load other views just below (here is what I have right now: Test App ) But I have a little problem. If I'll remove a comment in file TestAppDelegate.m on line 58 //[currentView release]; Application will crash with bunch of errors when I try to switch views. But if I comment this line Project analyzer is telling me that I have a potential leak with currentView variable. Can somebody spare some time and see in that code what I did wrong?

    Read the article

  • One label, two different fonts?

    - by 4thSpace
    I need to format text in a label like this: username: some text from this user. This will create additional lines of text that will go on and on and on. Where "username" is bold. This will go into a UILabel, which is in a custom table cell. Is there a way to get this type of layout?

    Read the article

  • testing an in app purchase??

    - by hemant
    i developed a application with in app purchases..when user buys the subscription it gets stored on my server..after testing it few times i deleted the data from server to test it again but when i buy it the sandbox environment says u you already purchased this.TAP OK to download it again for free also i have used this test account on my previous application?? does it means i will have to create a new test account for this application?? also by mistake i used this account on apple store..i read somewhere that doing this will make your test account invalid...is it true?? should i create a new account for it??

    Read the article

< Previous Page | 23 24 25 26 27 28 29 30 31 32 33 34  | Next Page >