Search Results

Search found 11296 results on 452 pages for 'facebook sdk 3 0'.

Page 75/452 | < Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >

  • UIImagePickerController crashing

    - by Mike
    I am developing a project based on iPhone OS 3.2 This project uses UIImagePickerController to pick videos. I have managed to put a video inside the iPad simulator. Photos.app can see and play the video, that was created using an iPhone 3GS, but whey I try to use the UIImagePickerController, it simply crashes my app. THis is the code I am using: if ([UIImagePickerController isSourceTypeAvailable: UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; picker.mediaTypes = [UIImagePickerController availableMediaTypesForSourceType:picker.sourceType];//shows movies and photos on iPhone picker.delegate = self; picker.sourceType = UIImagePickerControllerSourceTypePhotoLibrary; UIPopoverController *popover = [[UIPopoverController alloc] initWithContentViewController:picker]; CGRect myRect = CGRectMake(0,0,100,100); // this is a random rect just for testing [popover presentPopoverFromRect:myRect inView:myMainView permittedArrowDirections:UIPopoverArrowDirectionAny animated:YES]; } after running this, the app crashes miserably with the following message Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: 'Popovers cannot be presented from a view which does not have a window.' Is there something wrong with the code or it is just the simulator crashing because it is unable to pick videos? please refrain from recommending me to test on a real device. The problem is that I live outside the US and there's no iPad here soon. thanks.

    Read the article

  • MKMapKit custom annotations being added to map, but are not visible on the map

    - by culov
    I learned a lot from the screencast at http://icodeblog.com/2009/12/21/introduction-to-mapkit-in-iphone-os-3-0/ , and ive been trying to incorporate the way he creates a custom annotation into my iphone app. He is hardcoding annotations and adding them individually to the map, whereas i want to add them from my data source. So i have an array of objects with a lat and a lng (ive checked that the values are within range and ought to be appearing on the map) that i iterate through and do [mapView addAnnotation:truck] once this process is completed, i check the number of annotations on the map with [[mapView annotations] count] and its equal to the number it ought to be, so all the annotations are getting added onto the mapView, but for some reason I cant see any annotations in the simulator. I've compared my code with his in all the pertinent places many times, but nothing seems to stand out as being incorrect. Ive also reviewed my code for the last several hours trying to find a point where I do something wrong, but nothing is coming to mind. The images are named just as they are assigned in the custom AnnotationView, the loadAnnotation function is done properly, etc... i dont know what it could be. so i suppose if i could have the answer to one question it would be, what are possible causes for a mapView to contain several annotations, but to not show any on the map? Thanks

    Read the article

  • Horizontal UITableView

    - by imran
    I want implement a layout in my ipad application that has a uitable view that scrolls left and right rather then up and down : So rather than row 1 row 2 row 3 ( scrolling vertically ) It would be : row 1, row2, row 3 (scrolling horizontally ) I've seen that UItableView is designed to only do vertical scrolling so doing a transform does not give the desired effect. Is there a standard way to do this taking advantage of a datasource provider like uitableview provides? I basically want to do somthing similar to what the BBC News reader app ( http://itunes.apple.com/us/app/bbc-news/id364147881?mt=8 ) on the Ipad does with the list of stories to select from. Thanks

    Read the article

  • How can I debug VGA Out on an iPad?

    - by Elliot
    The Dock Connector to VGA Adapter (required for VGA out on the iPad) uses the Dock Connector, so I can't have my laptop connected at the same time. I remember reading something about a Remote debugger, but despite lots of searching, I'm unable to find it. How can I run the debugger to test VGA output of my iPad app?

    Read the article

  • Using UIScreen to drive a VGA display - doesn't seem to show the UIWindow?

    - by Peter Hajas
    HI there, I'm trying to use UIScreen to drive a separate screen with the VGA dongle on my iPad. Here's what I've got in my root view controller's viewDidLoad: //Code to detect if an external display is connected to the iPad. NSLog(@"Number of screens: %d", [[UIScreen screens]count]); //Now, if there's an external screen, we need to find its modes, itereate through them and find the highest one. Once we have that mode, break out, and set the UIWindow. if([[UIScreen screens]count] > 1) //if there are more than 1 screens connected to the device { CGSize max; UIScreenMode *maxScreenMode; for(int i = 0; i < [[[[UIScreen screens] objectAtIndex:1] availableModes]count]; i++) { UIScreenMode *current = [[[[UIScreen screens]objectAtIndex:1]availableModes]objectAtIndex:i]; if(current.size.width > max.width); { max = current.size; maxScreenMode = current; } } //Now we have the highest mode. Turn the external display to use that mode. UIScreen *external = [[UIScreen screens] objectAtIndex:1]; external.currentMode = maxScreenMode; //Boom! Now the external display is set to the proper mode. We need to now set the screen of a new UIWindow to the external screen external_disp = [externalDisplay alloc]; external_disp.drawImage = drawViewController.drawImage; UIWindow *newwindow = [UIWindow alloc]; [newwindow addSubview:external_disp.view]; newwindow.screen = external; }

    Read the article

  • accessing layer from class

    - by Mike
    I am creating a rounded corner UIImageView, but this image is created inside a class, using among other instructions, these following: myImageView.layer.cornerRadius = 20.0; myImageView.layer.masksToBounds = YES; myImageView.layer.borderColor = [UIColor darkGrayColor].CGColor; myImageView.layer.borderWidth = 1.0; but Xcode is yelling at me telling me unknown 'cornerRadius' component of a property unknown 'masksToBounds' component of a property unknown 'borderColor' component of a property unknown 'borderWidth' component of a property I know this code is valid, because I have created images like that before, but never inside a class. Why is this happening? how to solve that? thanks.

    Read the article

  • iPhone - in-app purchase to sell our products

    - by lostInTransit
    Hi I have a website which sells a product to the user (downloadable). I am creating an iPhone app and want to be able to sell some of the products using the 3.0's in-app purchase. Now the documentation mentions that anything you want to sell has to be uploaded to itunes connect and approved by Apple. But I want to be able to keep adding products to be sold by my app on a daily basis. I have a web service to get the list of products from the website. Is it possible to include in-app purchase to let user buy this stuff from within the app but without having to add them to itunes connect? Thanks

    Read the article

  • iPhone Feedback Service with PHP

    - by Anish
    HI All, Has anybody been able to extract the device tokens from the binary data that iPhone APNS feedback service returns using PHP? I am looking for something similar to what is been implementented using python here http://www.google.com/codesearch/p?hl=en&sa=N&cd=2&ct=rc#m5eOMDWiKUs/APNSWrapper/%5F%5Finit%5F%5F.py&q=feedback.push.apple.com As per the Apple documentation, I know that the first 4 bytes are timestamp, next 2 bytes is the length of the token and rest of the bytes are the actual token in binary format. (http://developer.apple.com/IPhone/library/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingWIthAPS/CommunicatingWIthAPS.html#//apple%5Fref/doc/uid/TP40008194-CH101-SW3) I am successfully able to extract the timestamp from the data feedback service returns, but the device token that I get after i convert to hexadecimal using the PHP's built in method bin2hex() is actually different than original device token. I am doing something silly in the conversion. Can anybody help me out if they have already implemented APNS feedback service using PHP? TIA, -Anish

    Read the article

  • iphone - keeping the last frame of a frame animation visible

    - by Mike
    I have this code UIImageView *sequence = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"balao_surge0.png"]]; NSMutableArray *array = [[NSMutableArray alloc] init] ; for (int i=0; i<30; i++) { UIImage *oneImage = [UIImage imageNamed:[NSString stringWithFormat:@"balao_surge%d.png",i]]; [array addObject:oneImage]; } sequence.animationImages = array; sequence.animationDuration = 2.0; sequence.animationRepeatCount = 1; [umaVista addSubview:sequence]; [sequence release]; sequence.startAnimating; The animation plays fine, but after the last frame is shown, it vanishes. I would like to make it stay visible, that is, make the animation stop on the last frame. Is there any way to do that? thanks for any help.

    Read the article

  • iPhone Keyboard hiding fields in UIWebView

    - by Pete
    Hi, I am a beginner at iPhone development and am hoping someone can help me with my question. I have a UIWebView displaying a web page. If the user taps inside a textbox on the web page then the keyboard pops up. This is great, but it hides the field that the user tapped on. I have looked around and found code samples to deal with this, but none that specifically deal with the UIWebView. I have implemented UIKeyboardDidShowNotification and UIKeyboardDidHideNotification but am not sure how to resize the UIWebView properly. I have tried putting the UIWebView in a UIScrollView but not had any success with that. The code below seems to adjust the UIWebView but won't let it scroll to the field. -(void) keyboardDidShow: (NSNotification *)notif{ if (keyboardShown) return; NSLog(@"Keyboard Show"); NSDictionary *info = [notif userInfo]; NSValue *aValue = [info objectForKey:UIKeyboardBoundsUserInfoKey]; CGSize keyboardSize = [aValue CGRectValue].size; CGRect viewFrame = webBrowser.frame; viewFrame.size.height -= keyboardSize.height; webBrowser.frame = viewFrame; keyboardShown = YES; } -(void) keyboardDidHide: (NSNotification *)notif{ NSLog(@"Keyboard hide"); keyboardShown = NO; } Hopefully someone can help me or point me in the right direction. Thanks! Pete

    Read the article

  • Tips on implementing a custom UITextView interface on the iPhone?

    - by Alex
    I am trying to implement a control to edit text that will display the text in multiple colors. None of the solutions I have attempted yet have been good enough. UITextView cannot accomplish this. All of the text must be the same color. Using CoreGraphics to draw the text does not allow the text to be selected. Using a UIWebView, DIV and PRE tags cannot be set to contentEditable on Mobile Safari. Currently playing with using an off-screen TEXTAREA and an on-screen DIV to show the rendered text. This works pretty well, except supporting all of these at the same time seems impossible: click-to-type, click-to-move-cursor, click-and-hold-select/copy/paste. Anyone have any tips on this predicament? I've been trying to find any preexisting library out there that will accomplish this in a good way, to no luck. I'm open to any ideas!

    Read the article

  • UISegmentedControl makes UITableView slow/lag?

    - by Zac Altman
    So I have a nicely working UITableView consisting of 3 rows (each including and image, and a varying number of text fields). Now the 4th row has a UISegmentedControl. As soon as I added it, the UITableView lags/jumps/skips. When I take it away again, everything is smooth. How can I add the UISegmentedControl and still have smooth scrolling?

    Read the article

  • Custom annotationView images revert to pins when clicked

    - by Danny Tuppeny
    I'm displaying custom images on a map (instead of the default pins) using the code below. However, when I tap on an item (and the callout appears), the image reverts to the default red pin. How can I keep my custom image, even when the callout is displayed? - (MKAnnotationView *) mapView:(MKMapView *)map viewForAnnotation:(id <MKAnnotation>)annotation { MKPinAnnotationView *pinAnnotation = nil; if (annotation != mapView.userLocation) { static NSString *pinID = @"mapPin"; pinAnnotation = (MKPinAnnotationView *)[mapView dequeueReusableAnnotationViewWithIdentifier:pinID]; if (pinAnnotation == nil) pinAnnotation = [[[MKPinAnnotationView alloc] initWithAnnotation:annotation reuseIdentifier:pinID] autorelease]; // Set the image pinAnnotation.image = [UIImage imageNamed:@"TestIcon.png"]; // Set ability to show callout pinAnnotation.canShowCallout = YES; // Set up the disclosure button on the right side UIButton *infoButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinAnnotation.rightCalloutAccessoryView = infoButton; [pinID release]; } return pinAnnotation; [pinAnnotation release]; }

    Read the article

  • iphone - making the CGAffineTransform permanent

    - by Mike
    I am banging my head on the wall here due to this problem: When I create a UIImageView this view has a certain orientation and size. Lets call this state "A". This view responds to taps. It can be dragged around the screen. At some point in the code I apply a CGAffineTransform to the view. Does not matter if the affine is a scale, a rotation, a translation or a combination of all. Does not matter also if the transform is absolute or relative. Not to mention the device can change its orientation and the view is autorotated to the correct orientation (that we can cay is a kind of rotation or transformation applied to the view). The problem is: the moment I touch that object or try to animate its transparency or any other parameter, it "remembers" the state "A" and does all animations from that state, not from current state. If I simply touch the view, it returns instantly to state "A". The code is not doing it by itself. It is an annoying "gift" from Apple. How to I make a view assume its current state of transformations as the reset or initial state? In other words, how do I make a view forget its past transformations or states? The only way I know is recreating the view, but this is a ridiculous way of doing this. Is there any way to make this work as I described? thanks

    Read the article

  • Outlets buggy, causing crash?

    - by Moshe
    I've been having issues with making outlets and I was wondering if there is a difference and what the difference could be... EDIT: Using Outlets seem to be causeing SIGABRT errors... // // hebOmer.h // tizkorPush // // Created by Moshe -...- . // Copyright 2010 __MyCompanyName__. All rights reserved. // #import <UIKit/UIKit.h> #import "support.h" #import "hdate.h" @interface hebOmer : UIViewController{ IBOutlet UIScrollView * hebrewScrollView; UILabel *hebrewOmer; } @property (nonatomic, retain) UIScrollView * hebrewScrollView; @property (nonatomic, retain) IBOutlet UILabel *hebrewOmer; @end Creating an outlet to the UILabel is causing problems. The implementation seems fine. @synthesize and the memory release functions were called properly.

    Read the article

  • iphone - manipulating movies

    - by Mike
    Is there a way to manipulate movies in iphone in a way I can have, for example, the exact timecode in realtime of a movie being played? or the timecode of a movie being scrubbed? And, btw, there's a way to scrub a video like the video edit mode of iPhone 3GS? Can you guys pinpoint me a way to follow, if any? thanks for any help.

    Read the article

  • Sqlite3 query in objective c

    - by user271753
    -(IBAction)ButtonPressed:(id)sender { const char *sql = "SELECT AccessCode FROM UserAccess"; NSString *sqlns; sqlns = [NSString stringWithUTF8String:sql]; if([Password.text isEqual:sqlns]) { NSLog(@"Correct"); } else { NSLog(@"Wrong"); } NSLog(@"%@",sqlns); } Noob here , At NSLog I am able to print "SELECT AccessCode FROM UserAccess" where as let say the access code is 1234 , which I want . In the appdelegate I Have : /// - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { // Override point for customization after app launch [self createEditableCopyOfDatabaseIfNeeded]; [window addSubview:viewController.view]; [window makeKeyAndVisible]; return YES; } /// - (void)createEditableCopyOfDatabaseIfNeeded { NSLog(@"Creating editable copy of database"); // First, test for existence. BOOL success; NSFileManager *fileManager = [NSFileManager defaultManager]; NSError *error; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *writableDBPath = [documentsDirectory stringByAppendingPathComponent:@"UserAccess.sqlite"]; success = [fileManager fileExistsAtPath:writableDBPath]; if (success) return; // The writable database does not exist, so copy the default to the appropriate location. NSString *defaultDBPath = [[[NSBundle mainBundle] resourcePath] stringByAppendingPathComponent:@"UserAccess.sqlite"]; success = [fileManager copyItemAtPath:defaultDBPath toPath:writableDBPath error:&error]; if (!success) { NSAssert1(0, @"Failed to create writable database file with message '%@'.", [error localizedDescription]); } } /// +(sqlite3 *) getNewDBConnection{ sqlite3 *newDBconnection; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *path = [documentsDirectory stringByAppendingPathComponent:@"UserAccess.sqlite"]; // Open the database. The database was prepared outside the application. if (sqlite3_open([path UTF8String], &newDBconnection) == SQLITE_OK) { NSLog(@"Database Successfully Opened :) "); } else { NSLog(@"Error in opening database :( "); } return newDBconnection; } Please help :(

    Read the article

  • PHP and Objective C Communication

    - by meetS
    Hii, I have PHP script link,which responds YES or NO when we set post userName and emailID.I have used ASI framework. But it is not working....Here is my code....Thanks in advance... **NSURL *url = [NSURL URLWithString:@"https://abc.com/abctest/registration.php"]; ASIFormDataRequest *request = [[ASIFormDataRequest alloc] initWithURL:url]; [request setPostValue:@"[email protected]" forKey:@"email"]; [request setPostValue:@"pqr" forKey:@"ebayName"]; [request start]; NSError *error = [request error]; if (!error) { NSString *response = [request responseString]; printf("\n\n\n Responce %s",[response UTF8String]); response = [response stringByTrimmingCharactersInSet:[NSCharacterSet whitespaceAndNewlineCharacterSet]]; if ([response isEqualToString:@"YES"]) { printf("\n\n YES"); } }

    Read the article

  • How to intercept touches events on a MKMapView or UIWebView objects?

    - by Martin
    Hello, I'm not sure what i'm doing wrong but I try to catch touches on a MKMapView object. I subclassed it by creating the following class : #import <UIKit/UIKit.h> #import <MapKit/MapKit.h> @interface MapViewWithTouches : MKMapView { } - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *) event; @end And the implementation : #import "MapViewWithTouches.h" @implementation MapViewWithTouches - (void) touchesBegan:(NSSet *)touches withEvent:(UIEvent *) event { NSLog(@"hello"); //[super touchesBegan:touches withEvent:event]; } @end But it looks like when I use this class, I see nothing on the Console : MapViewWithTouches *mapView = [[MapViewWithTouches alloc] initWithFrame:self.view.frame]; [self.view insertSubview:mapView atIndex:0]; Any idea what I'm doing wrong? Heelp! :) Thanks a lot! Martin

    Read the article

  • How to tell a rightCalloutAccessoryView has been touched for MapKit

    - by iamdadude
    I have a MKAnnotationView being allocated with a DetailDisclosure button being displayed on the right side of the annotation. How would I go about knowing when a user clicked on the annotation button? This is what my code looks like right now - UIButton *rightButton = [UIButton buttonWithType:UIButtonTypeDetailDisclosure]; pinView.rightCalloutAccessoryView = rightButton; pinView.animatesDrop = YES; Is there a built in method to detect when a accessory view has been touched? I'm guessing it would be like the UITableView methods, but I can't find anything. Thanks for any help.

    Read the article

  • FBML elements rendering delay

    - by jeffreyveon
    I am using FBML for rendering certain elements on the page such as the name of the user, profil pic, etc. However when there are many FBML elements on page, there is a slight delay which occurs before they are rendered - that's fine since AJAX calls are made to the server to fetch the data by the JS FB library. However, I want to hide the container DIV holding these element till the elements have finished loading, so is there any way to specify a JS callback function which gets fired when the FBML data has finished loading?

    Read the article

  • Why does CTFontCreateWithName != NULL on iPhone OS 3.1.3?

    - by Tony
    I am following the instructions in the Apple dev docs: http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/cross_development/Using/using.html#//apple_ref/doc/uid/20002000-1114537 In this case, I'm trying to conditionally execute code, depending on whether or not CTFontCreateWithName is defined. Here is what I've reduced my test case down to: if (CTFontCreateWithName != NULL) NSLog(@"CTFontCreateWithName = %p", CTFontCreateWithName); This prints "CTFontCreateWithName = 0x0", which suggests that it's both NULL and not NULL at the same time. Even though CTFontCreateWithName != NULL evaluates to true, I get an error saying it can't resolve the symbol _CTFontCreateWithName once it gets to the line that uses it. Any ideas? Is %p not the correct way to print out the address of a function? For what it's worth, the example in their docs, UIGraphicsBeginPDFPage != NULL, evaluates to false, so it works for that one.

    Read the article

  • Shake based application

    - by Sid
    hii frnz, i am developing an application which deletes rows from a table view when the user shakes the iPhone.i have created a navigation based project. now when the user shakes the iPhone i want that the title of navigation bar should change to "DELETE" and a delete button should appear on the navigation bar on the same view (but this operation should take place only when the user shakes the iPhone )otherwise when a user selects a particular row then it should move to next view.I have written the followin code but its not working.plz help me out..... (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { //NSLog(@"hiiiii"); if (isShaked == NO) { //logic to move to next view goes here. } else { self.title = @"Delete Rows"; delete=[[UIBarButtonItem alloc] initWithTitle:@"Delete rows" style: UIBarButtonItemStyleBordered target:self action:@selector(deleteItemsSelected)] ; self.navigationItem.rightBarButtonItem=self.delete; MyTableCell *targetCustomCell = (MyTableCell *)[tableView cellForRowAtIndexPath:indexPath]; [targetCustomCell checkAction]; [self.tempArray addObject: [myModal.listOfStates objectAtIndex:indexPath.row]]; //[delete addTarget:self action:@selector(deleteItemsSelected:) forControlEvents:UIControlEventTouchUpInside]; self.tempTableView = tableView; } } -(void)deleteItemsSelected { //for(int i = 0; i <= [tempArray count]; i++) //{ //} [myModal.listOfStates removeObjectsInArray:tempArray]; [tempTableView reloadData]; } checkAction method is a custom cell method which is used to put a tickmark on the row selected

    Read the article

< Previous Page | 71 72 73 74 75 76 77 78 79 80 81 82  | Next Page >