ios6

Terminating with uncaught exception of type NSException (xcode 6)

限于喜欢 提交于 2020-01-02 10:03:06
问题 Terminating app due to uncaught exception: 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set. I am getting this error in xcode 6. I know how to set view outlet in xcode 5 or below version (go to connection inspector drag outlet radio button to file's Owner then it pop with a view and then click on view sets the outlet) but view popup is not comming in xcode 6 (beta). Is it a xcode 6

Terminating with uncaught exception of type NSException (xcode 6)

*爱你&永不变心* 提交于 2020-01-02 10:02:52
问题 Terminating app due to uncaught exception: 'NSInternalInconsistencyException', reason: '-[UIViewController _loadViewFromNibNamed:bundle:] loaded the "ViewController" nib but the view outlet was not set. I am getting this error in xcode 6. I know how to set view outlet in xcode 5 or below version (go to connection inspector drag outlet radio button to file's Owner then it pop with a view and then click on view sets the outlet) but view popup is not comming in xcode 6 (beta). Is it a xcode 6

Strange JavaScript behaviour on mobile Safari iOS 6

耗尽温柔 提交于 2020-01-02 08:13:14
问题 I ran into a very very very strange JS issue that is reproducing only on Mobile Safari browser on iOS 6. The issue is in a function that formats a given value to a price, by stripping down the number to 2 decimals and adds the currency in front of the number. Here are the functions. I will explain later on how to reproduce the bug. formatCurrency = function(value, currency, fixedPrecision, colourize, blankIfZero) { var text; if (blankIfZero && (Math.abs(value) < 0.01 || value === undefined))

Detecting panning + decelerate of MKMapView

狂风中的少年 提交于 2020-01-02 06:16:13
问题 I'm trying to capture panning and the 'end of scrolling' on an MKMapView. Panning is easy to do with a gesture recognizer. However, MKMapView doesn't seem to implement a UIScrollViewDelegate in iOS 6. That makes the solution in Is there way to limit MKMapView maximum zoom level? not work. Thoughts? Ideally I would have just leveraged the UIScrollViewDelegate as such: -(void)scrollViewDidEndDecelerating:(UIScrollView *)scrollView { if ([super respondsToSelector:@selector

In iOS 6, check if a person is logged in to a social network?

做~自己de王妃 提交于 2020-01-02 05:34:09
问题 Is there a way to check if a user actually is logged in to facebook or twitter in the operating system. The reason I want to do this is to fall back on sharing in the application by for example using facebooks SDK instead to share, without asking the user to log in again. I actually thought that the code: [SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]; did exactly that, but apparently it only shows an alert if the user has not logged in. This only occurs when the

Auto Layout UILabels

纵饮孤独 提交于 2020-01-02 04:55:12
问题 I have three UILabels in my custom UITableViewCell . It might be that some UILabels will be empty ( label.text == @"" ) - (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *CellIdentifier = @"EventCell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier]; NSString *key = [[keysArray objectAtIndex:indexPath.section] description]; UILabel *nameLabel = (UILabel *)[cell viewWithTag:100];

Getting error ACErrorPermissionDenied (error code 7) for Facebook when using Social Framework

﹥>﹥吖頭↗ 提交于 2020-01-02 04:38:26
问题 I am fetching the user’s Facebook account ID and name using ACAccountStore . When an alert comes up asking the user for permission (“XYZ would like to access your news feed and profile”) and the user taps on “Don’t Allow”, I get error code 7, i.e ACErrorPermissionDenied . But after that, if I go to Settings and switch on the Facebook settings for my app and back in the app the alert pops up again and the user taps on “OK”, I’m still getting error code 7 ( ACErrorPermissionDenied ). So it’s

Moving to iOS6 I get this linker error with almost all external packages

霸气de小男生 提交于 2020-01-02 04:30:22
问题 "file was built for archive which is not the architecture being linked (armv7s)" do I need to wait for people to release new binaries or I have a way out, I get this for GoogleAnalytics Restkit ... EDIT: problem with Restkit solved with their latest commit, just pull from github, 回答1: Yes, they will have to release binaries which are compiled for armv7s architecture to support the new iPhone 5 A6 processor. In the meantime, you can temporarily compile against only armv7 to continue

ERROR data argument not used by format string on mySLComposerSheet

大城市里の小女人 提交于 2020-01-02 04:27:07
问题 I'm a bit confused at why I'm getting the ERROR 'data argument not used by format string' Has anybody else got this or fixed this in Xcode 4.5 for iOS6? - (IBAction)facebookPost:(id)sender { if([SLComposeViewController isAvailableForServiceType:SLServiceTypeFacebook]) { mySLComposerSheet = [[SLComposeViewController alloc] init]; mySLComposerSheet = [SLComposeViewController composeViewControllerForServiceType:SLServiceTypeFacebook]; [mySLComposerSheet setInitialText:[NSString stringWithFormat:

Indexpath of the button from UICollectionView

陌路散爱 提交于 2020-01-02 03:11:09
问题 I tried to: - (IBAction)delete:(UIButton*)sender{ NSIndexPath *indexPath = [self.collectionView indexPathForCell:(TourGridCell *)[[[sender superview]superview]superview]]; } But NSLog shows that cell exist, but indexpath is nil. 回答1: OK, here it is: - (IBAction)delete:(UIButton *)sender{ NSIndexPath *indexPath = nil; indexPath = [self.collectionView indexPathForItemAtPoint:[self.collectionView convertPoint:sender.center fromView:sender.superview]]; } 回答2: Sometimes it's the simplest possible