ios6

Showing a HUD whilst an image is downscaled in size

让人想犯罪 __ 提交于 2019-12-08 09:26:34
问题 I have an app where the user takes a photo using the Camera and then chooses to Use the photo. The following method is called: - (void)imagePickerController:(UIImagePickerController *)picker didFinishPickingMediaWithInfo:(NSDictionary *)info Within this method I check the NSData length of the image and resize the actual image if the data (Kb) size is too large, then check again. This way I only scale down small amounts to keep the highest quality/sized image rather than a specific size w/h.

Set EKAlarm in iphone app

倖福魔咒の 提交于 2019-12-08 09:18:17
问题 I m trying to set alarm from app with my audio file but getting lots of messages like Use of undeclared identifier EKAlarm Unknown receiver EKEvent did you mean UIEvent Member reference base type 'int" is not a structure or union @property (retain, nonatomic) EKAlarm *alarm; @synthesize alarm; -(void) AlarmAction:(id)sender{ EKAlarm *alarm = [EKAlarm alarmWithRelativeOffset:-300]; [EKEvent addAlarm:alarm]; alarm.soundName = } Thanks for help. 回答1: Have you added the EventKit framework? It

animating text box when clicked

↘锁芯ラ 提交于 2019-12-08 08:42:15
问题 I am trying to move a text box from the bottom of the screen in an iPad app so that the keyboard does not cover it. I have the following which works. -(void) textViewDidBeginEditing:(UITextView *) observationComment { observationComment.frame=CGRectMake(190, 100, 700, 250); } But 1 - I would like to animate the movement - is this possible? 2 - I get a warning Local declaration of 'observationComment' hides instance variable Any advice? Maybe this is not the best way to do it. 回答1: I

Strange error of executable while creating archive/.pkg with PDF content to Host at Apple

走远了吗. 提交于 2019-12-08 08:26:39
问题 I have enabled In App Purchase for my an application and integrated the classes. The type of purchase is Non-Consumable and I mark Host Content with Apple to YES. When I want to host content with Apple I need to provide Hosted Content Package. Here are the steps I am following to create the Package (.pkg): File -> New -> Project... -> Other (iOS) -> In-App Purchase Content. New project gets created. Put data to this project , making necessary change with .plist file and choose: Product ->

XCode iO6: UIWebView Returns Black Screen After Returning from Choosing a Photo

99封情书 提交于 2019-12-08 08:14:49
问题 Here are the sequence of events which cause my app to return a black screen: 1.) I select a button on my website via the app's UIWebView that allows me to change my profile picture. 2.) The app pulls up the three standard options from the bottom of the screen: "Take Photo or Video", "Choose Existing", "Cancel" 3.) If I choose either of the first two options and then choose or take a photo, my app returns to display a black screen. The profile picture is not changed. I also notice that the

Restoring purchases in iOS

爱⌒轻易说出口 提交于 2019-12-08 07:51:29
问题 I am working on restoring purchases, So I have few doubts 1) How to show restore button I have shown it on top left corner, and on click of it I call this function - (IBAction)restorePurchases:(id)sender { [[SKPaymentQueue defaultQueue] addTransactionObserver:self]; [[SKPaymentQueue defaultQueue]restoreCompletedTransactions]; } But What if the user has not purchased anyItem or what if the user has purchased an item but not deleted and reinstalled the app, Whether I still need to show the

Empty all cells from UICollectionView

对着背影说爱祢 提交于 2019-12-08 07:39:24
问题 Using iOS6's awesome new UICollectionView how am I able to delete all of the UICollectionViewCell objects in a big loop? Say I've loaded all my data into it already, I hit refresh, I want to delete everything currently in there, then just call my stuff again. I've found deleteItemsAtIndexPaths which takes an NSArray , so how can I get all items into it? 回答1: The proper way of clearing out a UICollectionVew is to simply clear the data source and then reload the collection view. So if your data

iOS - Facebook Open Graph Api — ensuring that photos are user generated

佐手、 提交于 2019-12-08 07:34:07
问题 I am attempting to achieve the following: This necessitates the open graph request to look something like this: (https://developers.facebook.com/docs/opengraph/howtos/adding-photos-to-stories/) POST /me/cookbook:eat? recipe=http://www.example.com/recipes/pizza/& image[0][url]=http://www.example.com/recipes/pizza/pizza.jpg& image[0][user_generated]=true& image[1][url]=http://www.example.com/recipes/pizza/pizza2.jpg& image[1][user_generated]=true& access_token=VALID_ACCESS_TOKEN However, using

Post to friend's wall Facebook iOS SDK 3.1

别来无恙 提交于 2019-12-08 07:26:38
问题 According to Facebook Developer Roadmap (https://developers.facebook.com/roadmap/), they are saying that we won't be able to post to a Friend Wall except using the Feed Dialog, but feed dialog is deprecated on iOS SDK 3.1 Which is the better way to go in my case? I need a User to select from his friend list, and then post a link to their wall. Thanks in advance 回答1: You can use feed dialog. I think FB is going to have to keep this around. My apps are using them fine right now. https:/

ipad modalviewcontroller when dismissed does not go to the viewdidappear of the mainviewcontroller

岁酱吖の 提交于 2019-12-08 07:02:39
问题 Hi I have a modalview controller that pops up on the main menu after the user successfully logs in. This is used for additional roles that needs to be saved on the userdefaults. The modal gets dismissed properly but it doesn't go through the -viewdidappear method after. I had it programmed so that after choosing the role, it would load the whole main menu with populated data based off of the role. I used to do a "presentViewController:roleVC" instead of the modal but decided not to use it