Search Results

Search found 16516 results on 661 pages for 'facebook sdk 3 14 x'.

Page 93/661 | < Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >

  • MPMediaItem - NSCoding problem with MPMediaItemArtwork

    - by z s
    Hi, So MPMediaItem conforms to NSCoding, but it contains a pointer to MPMediaItemArtwork, which doesn't conform to NSCoding. So if I try to archive a MPMediaItem, if that item has some artwork in it, it will not be able to unarchive. I tried to make a category of MPMediaItemArtwork and make it conform to NSCoding, but I can't seem to do that because we don't have access to the actual UIImage that it stores. Does anyone know of any other creative ways to get around this problem? I want to be able to archive an MPMediaItem, even if it means somehow stripping off the artwork object. Is there a way to make a category of a class to strip away certain functionality (instead of just adding more, like we do with categories)? Or any other clever way to achieve this? Thanks.

    Read the article

  • cocoa - converting a double to string

    - by Mike
    I have a double number and I would like to convert it to string. The number is, for example, something like 24.043333332154465777... but if I convert it to string using something like NSString *myString = [NSString stringWithFormat:@"%f", myDouble]; The string is just 24.043333 how do I get a full string the corresponds to the whole double number? What other methods do I have to convert this?

    Read the article

  • What is the proper way to align UITableViewCells when only some have an imageView?

    - by Topher Fangio
    Hello all, I am new to iPhone programming and working on my first real application (i.e. one not written in a book or online) and I've run into a small problem which I could solve a multitude of ways, but feel like there should be a good solution that perhaps I am just missing. Here is the scenario: I have a UITableView with a bunch of standard UITableViewCells in it. What I want to do is toggle a green check mark when the cell is selected and I have that part working (note: I'm already using the accessoryType for something else, so I can't use it for the checkmark...besides, it's not as pretty). Unfortunately, when I toggle the checkmark like so: if (...) { cell.imageView.image = [UIImage imageNamed:@"checkmark.png"]; } else { cell.imageView.image = nil; } It makes the cell's label bounce back and forth depending on whether it is checked or not. What is the proper way to align the cell's text (set via cell.textLabel.text) regardless of whether or not it has an image set? The solutions I have come up with are: Create a blank 40x40 png image in Photoshop and set the unchecked to that Create a blank 40x40 image solely in code Set some setting that I don't know about that will align it for me Create a subclass of UITableCellView that does what I need (which would be stupid, I'd just go with option 1...) Suggestions? Thoughts? Comments? Thank you very much :-) P.S. I'd like the solution to work with OS 3.0 and 4.0 if that makes any sort of difference.

    Read the article

  • iphone: how do I obtain a list of all files with a given extension on the app's document folder?

    - by Mike
    I have saved all my files using something like this NSString *fileName = [NSString stringWithFormat:@"%@.plist", myName]; NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *documentsDirectory = [paths objectAtIndex:0]; NSString *appFile = [documentsDirectory stringByAppendingPathComponent:fileName]; [myDict writeToFile:appFile atomically:YES]) //where myDic is a dictionary containing the value of all parameters I would like to save. All these files were saved with the .plist extension. The same directory contains several JPG and PNG files. Now, how do I retrieve the list of all .plist files on that directory? thanks for any help.

    Read the article

  • iphone - compiler conditional on header

    - by Mike
    I have a project that generates applications for two targets. One of the targets has to include one additional delegate protocol that should not be present on the other one. So, I have created a macro on Xcode and declared the header like this: #ifdef TARGET_1 @interface myViewController : UIViewController <UIScrollViewDelegate, UIPopoverControllerDelegate> #endif #ifdef TARGET_2 @interface myViewController : UIViewController <UIScrollViewDelegate> #endif { .... bla bla.... } The problem is that Xcode is not liking this "double" declaration of @interface and is giving me all sort of problems. How to solve that? thanks for any help.

    Read the article

  • iPad Icon names?

    - by harekam_taj
    Hey Guys, Do I have to put 2 icon images in my build for iPad? and what are the names of those 2 build, one is Icon.png and what is the other one? Thanks for all your help

    Read the article

  • Cocoa - array not sorting?

    - by Mike
    I have this set NSMutableSet *mySet = [NSMutableSet setWithObjects: @"2", @"8", @"7", @"0", @"3", nil]; I copy the set to an array and sort it using NSArray *sortedArray = [[mySet allObjects] sortedArrayUsingSelector:@selector(compare:)]; The resulting array is in exactly the same order as the set and is not being sorted. Why? thanks for any help. EDIT: CORRECING A TYPO.

    Read the article

  • When iPhone Application Submitted Information Changes Reflects

    - by Nirmal
    Hello... Fortunately our first application is in App Store now.. And in my itunesconnect account some of the fields are editable like screenshots, support url etc.. So, my question is if I update some of my screenshots or if I update the support url field when it will be reflects to itunes ? Or it will directly reflects once I update my current application ? Thanks in advance...

    Read the article

  • CAScrollLayer doesn't scroll!

    - by Cliff
    Maybe it's because it's late. Whatever the reason I can't figure out why I'm having trouble with a simple CSScrollLayer example I'm trying. I add a 50 pixel Eclipse icon to a view based project and in my initialize method (called from initWithNibName:bundle:) I have this: -(void) initialize { CAScrollLayer *scrollLayer = [CAScrollLayer layer]; scrollLayer.backgroundColor = [[UIColor blackColor] CGColor]; CGRect bounds = self.view.bounds; scrollLayer.bounds = CGRectMake(0, 0, bounds.size.width, bounds.size.height); scrollLayer.contentsRect = CGRectMake(0, 0, bounds.size.width + 800, bounds.size.height + 800); scrollLayer.borderWidth = 2.5; scrollLayer.borderColor = [[UIColor redColor] CGColor]; scrollLayer.position = CGPointMake(self.view.center.x, self.view.center.y - 20); scrollLayer.scrollMode = kCAScrollBoth; [self.view.layer addSublayer:scrollLayer]; UIImage *image = [UIImage imageNamed:@"eclipse32.gif"]; for(int i=0; i<6; i++) { layer = [CALayer layer]; layer.backgroundColor = [[UIColor blackColor] CGColor]; layer.bounds = CGRectMake(0, 0, 100, 100); layer.contents = (id)[image CGImage]; layer.position = CGPointMake(layer.bounds.size.width * i, self.view.center.y); [scrollLayer addSublayer:layer]; } // [button removeFromSuperview]; // [self.view addSubview:button]; // self.view.userInteractionEnabled = YES; [image release]; } The scroll layer shows, the icon is repeated on the layer I have a border around the edge of the screen. Everything is lovely except I can't scroll the icons. I've tried with/without setting scroll mode. I've tried with a single stretched icon that falls off screen. I've tried everything. What am I doing wrong?

    Read the article

  • MPMusicPlayerController stops sending notifications

    - by jasongullickson
    I have a MPMusicPlayerController playing the entire iPod library and I'm subscribed to the notifications when tracks change etc. This is all working correctly When the end of the playlist is reached, MPMusicPlayerController sends a change of state notification and stops. When I re-start the player, music begins to play again but MPMusicPlayerController no longer sends notifications when tracks change, etc. Thoughts?

    Read the article

  • How do I integrate popToRootViewControllerAnimated with my tabs?

    - by Adam Storr
    Hello! I am trying to make one of my tab buttons go to the root using popToRootViewControllerAnimated. My question is: where do I put this code for it to work? I have my tabs created through Interface Builder... do they have to be hard coded for this to work? Here is the code that I'm looking to use: [self.navigationController popToRootViewControllerAnimated:YES]; New code in AppDelegate: - (void)tabBarController:(UITabBarController *)tabBarController didSelectViewController:(UIViewController *)viewController { if (viewController = HomeViewController) { [HomeViewController popToRootViewControllerAnimated:NO]; } }

    Read the article

  • how can i get user notifications with the new Graph API

    - by user63898
    hello all im making switch to the new Graph API , and i try to replace all the rest api with the new Graph api reading the docs i saw i have some kind of real time function ( im not sure its related to getting the user notifications ) that suppose to return me callback . but im my case i like to invoke simple http command and get the user notification like ( like the old notification api's ) how can i do it now ? Thanks

    Read the article

  • Cannot hide a UIButton - Please help!

    - by Neurofluxation
    Hey again, I have the following code: visitSite.hidden = YES; For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide. The code is within this block: -(IBAction)welcomeButtonPressed:(id)sender { [UIButton beginAnimations:@"welcomeAnimation" context:NULL]; [UIButton setAnimationDuration:1.5]; [UIButton SetAnimationDidStopSelector:@selector(nowHideThisSiteButton:finished:context:)]; [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; ((UIView *)sender).hidden = YES; [UIButton commitAnimations]; } and the stop selector below: -(void)nowHideThisSiteButton:(NSString *)animationID finished:(BOOL *)finished context:(void *)context { visitSite.hidden = YES; } I've also tried [visitSite setHidden:YES]; and that fails as well. ALSO I've noticed that the setAnimationDidStopSelector does not get called at all. Also, visitSite (when NSLogged) equals: <UIButton: 0x1290f0; frame = (0 0; 320 460); opaque = NO; autoresize = RM+BM; layer = <CALayer: 0x1290f0>> visitSite.hidden (when NSLogged) equals: NULL Any more ideas? :(

    Read the article

  • UIPickerView not displaying

    - by 4thSpace
    I have a UIPickerView on a UIView. I've implemented its protocol and delegates in the .m file: <UIPickerViewDataSource, UIPickerViewDelegate> In IB, I've connected the above to the picker, which I also have an IBoutlet for. The methods look like this: - (NSInteger)numberOfComponentsInPickerView:(UIPickerView *)thePickerView { return 1; } - (NSInteger)pickerView:(UIPickerView *)thePickerView numberOfRowsInComponent:(NSInteger)component { return [self.arr count]; } - (NSString *)pickerView:(UIPickerView *)thePickerView titleForRow:(NSInteger)row forComponent:(NSInteger)component { return @"test"; } - (void)pickerView:(UIPickerView *)thePickerView didSelectRow:(NSInteger)row inComponent:(NSInteger)component { //do something } Any ideas which piece I'm missing to get the picker working?

    Read the article

  • Always center UIView

    - by bresc
    Hi, I have a small UIView that should appear always in the center of the screen. This works great for portrait mode but does not in landscape. To draw the UIView I use: myView.frame = CGRectMake((visibleArea.size.width - MY_VIEW_WIDTH) / 2, (visibleArea.size.height - MY_VIEW_HEIGHT) / 2, MY_VIEW_WIDTH, MY_VIEW_HEIGHT); myView.autoresizingMask = ( UIViewAutoresizingFlexibleTopMargin | UIViewAutoresizingFlexibleBottomMargin | UIViewAutoresizingFlexibleLeftMargin | UIViewAutoresizingFlexibleRightMargin ); Any ideas what might be missing?

    Read the article

  • MapKit 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

  • Cannot hide a UIButton

    - by Neurofluxation
    Hey again, I have the following code: visitSite.hidden = YES; For some reason, when I click a UIButton and call this piece of code, the visitSite button does not hide. The code is within this block: -(IBAction)welcomeButtonPressed:(id)sender { [UIButton beginAnimations:@"welcomeAnimation" context:NULL]; [UIButton setAnimationDuration:1.5]; [UIButton setAnimationTransition:UIViewAnimationTransitionCurlUp forView:self.view cache:YES]; ((UIView *)sender).hidden = YES; [UIButton commitAnimations]; visitWebsite.hidden = YES; //THIS DOESN'T WORK! } Help!!

    Read the article

  • UITableView gives empty table, does not load data

    - by Alex L
    Hi, Everything works fine when the view that holds my table is the main (first) view. However, when it's not the first view and I switch into that view, my table does not load data and I get an empty table. Using NSLog I can tell that the program is not invoking numberOfRowsInSection and cellForRowAtIndexPath. I have <UITableViewDataSource, UITableViewDelegate>, IBOutlet UITableview *tableView all declared. They are also connected in the InterfaceBuilder. I tried using viewWillAppear and [tableView reloadData] but that did not help. I'm new to iPhone development and your help is appreciated!

    Read the article

  • Alarm Clock settings proble,

    - by Viral
    Hello Friends, when i change 24/12 setting from my application at that time as soon as change iphone setting also change which i select from my application... Is it possible....? if yes than say me it's urgent...

    Read the article

  • IVsEditorAdaptersFactoryService.CreateVsTextViewAdapter throws an object null reference

    - by Adam Driscoll
    I'm trying to create a IVsTextViewAdpater with the IVsEditorAdaptersFactoryService but when I call CreateVsTextViewAdapter it throws an object null reference: var editorFactory = componentModel.GetService<IVsEditorAdaptersFactoryService>(); var serviceProvider = (Microsoft.VisualStudio.OLE.Interop.IServiceProvider)this; var view = editorFactory.CreateVsTextViewAdapter(serviceProvider); 'this' is a Microsoft.VisualStudio.Shell.Package implementation. Any ideas?

    Read the article

  • How to get a UIScrollView embedded within a UITableCellView to scroll?

    - by Zan
    I have a scroll view containing several images embedded within a custom cell view, it sometimes scrolls horizontally if I keep holding the cell for a while. I tried a lot of things and it doesn't seem to work, please help? Here's part of the CustomCell : UITableViewCell code: -(void) layoutSubviews { CGRect scrollViewFrame = CGRectMake(0, 0, 320, 200); self.scrollView.frame = scrollViewFrame; self.scrollView.backgroundColor = [UIColor whiteColor]; self.scrollView.contentSize = CGSizeMake((320*3), 200); self.scrollView.scrollEnabled = YES; self.scrollView.clipsToBounds = YES; self.scrollView.pagingEnabled = YES; self.scrollView.showsHorizontalScrollIndicator = NO; self.scrollView.showsVerticalScrollIndicator = NO; self.scrollView.scrollsToTop = NO; self.scrollView.delegate = self; self.scrollView.userInteractionEnabled = YES; // add 3 images to subview here pageControl.backgroundColor = [UIColor colorWithRed:0 green:0 blue:0 alpha:0.7]; pageControl.frame = CGRectMake(0, 170, 320, 30); pageControl.numberOfPages = 8;} I tested the code on a UIViewController and it works just fine, I'm guessing that this is caused by cell selection and I tried returning nil when the cell gets selected and that didn't work. I also tried passing touches to the scrollview and that didn't work either, please help?

    Read the article

  • iPhone OS: Strategies for high density image work

    - by Jasconius
    I have a project that is coming around the bend this summer that is going to involve, potentially, an extremely high volume of image data for display. We are talking hundreds of 640x480-ish images in a given application session (scaled to a smaller resolution when displayed), and handfuls of very large (1280x1024 or higher) images at a time. I've already done some preliminary work and I've found that the typical 640x480ish image is just a shade under 1MB in memory when placed into a UIImageView and displayed... but the very large images can be a whopping 5+ MB's in some cases. This project is actually be targeted at the iPad, which, in my Instruments tests seems to cap out at about 80-100MB's of addressable physical memory. Details aside, I need to start thinking of how to move huge volumes of image data between virtual and physical memory while preserving the fluidity and responsiveness of the application, which will be high visibility. I'm probably on the higher ends of intermediate at Objective-C... so I am looking for some solid articles and advice on the following: 1) Responsible management of UIImage and UIImageView in the name of conserving physical RAM 2) Merits of using CGImage over UIImage, particularly for the huge images, and if there will be any performance gain 3) Anything dealing with memory paging particularly as it pertains to images I will epilogue by saying that the numbers I have above maybe off by about 10 or 15%. Images may or may not end up being bundled into the actual app itself as opposed to being loaded in from an external server.

    Read the article

  • Calling method after view has loaded

    - by iamdadude
    My iPhone app allows for users to type in their usernames and passwords so that they can login. When they login once, their usernames and passwords are saved so that users don't have to type it in again. My problem is, when the app starts again, it immediately starts logging them in, leaving the interface completely black. How would I go about calling my login method AFTER all the UI methods are loaded?

    Read the article

< Previous Page | 89 90 91 92 93 94 95 96 97 98 99 100  | Next Page >