ios7

backBarButtonItem gets renamed in iOS 7 when there is a long title

☆樱花仙子☆ 提交于 2019-12-21 09:15:05
问题 One behavior I observed in iOS 7 is that the title of the backBarButtonItem of a UINavigationItem get's renamed if the title of the currently displayed view controller is too long. Too lazy to explain so here are some photos: As you can see, when the title is too long, the back button gets renamed to "Back" regardless of what it was previously. If the title is even longer, the back button doesn't show any text, just the left arrow image. Does anyone know how to disable this behavior? I would

iOS7 Tabbar icons too big

六眼飞鱼酱① 提交于 2019-12-21 09:14:29
问题 Seems I am having difficulty with something as simple as icons. I am building an app for iOS7 only and thus, devices are retina displays (excluding iPad 2). So I made up some 60 x 60 icons for my tabbar. However these are just too big. And 30 x 30 is a little pixelated. Here is what a 60 x 60 icon looks like: Can someone tell me why this is happening? 回答1: Keep 60x60px icons but rename them as iconName@2x.png which iOS will automatically reduce to 30x30 points, roughly to half of the original

Customising position of header in UICollectionView layout causes NSInternalInconsistencyException error

烂漫一生 提交于 2019-12-21 08:48:31
问题 I am trying to customise the positions of the headers in a UICollectionView using a subclassed UICollectionViewFlowLayout class (based loosely on the code for stacked headers which is shown enter link description here). As a minimal test, let's say I just want to add a fixed offset to the position of all headers: I add all headers to the array returned by layoutAttributesForElementsInRect so that all are always processed (this may be the cause of the problem, I'm not sure) I then update each

Customising position of header in UICollectionView layout causes NSInternalInconsistencyException error

空扰寡人 提交于 2019-12-21 08:46:07
问题 I am trying to customise the positions of the headers in a UICollectionView using a subclassed UICollectionViewFlowLayout class (based loosely on the code for stacked headers which is shown enter link description here). As a minimal test, let's say I just want to add a fixed offset to the position of all headers: I add all headers to the array returned by layoutAttributesForElementsInRect so that all are always processed (this may be the cause of the problem, I'm not sure) I then update each

UIActionSheet with swift

断了今生、忘了曾经 提交于 2019-12-21 07:56:22
问题 I created an action sheet, but the problem is that the delegate method is not called myActionSheet = UIActionSheet() myActionSheet.addButtonWithTitle("Add event") myActionSheet.addButtonWithTitle("close") myActionSheet.cancelButtonIndex = 1 myActionSheet.showInView(self.view) /// UIActionSheetDelegate func actionSheet(myActionSheet: UIActionSheet!, clickedButtonAtIndex buttonIndex: Int){ if(myActionSheet.tag == 1){ if (buttonIndex == 0){ println("the index is 0") } } } I used another way

How to use useLayoutToLayoutNavigationTransitions in UICollectionView?

落花浮王杯 提交于 2019-12-21 06:26:18
问题 I was trying to learn the new layout transition effect in iOS7 collection view. However, I am unable to get it to work at all. I have attached a screen shot description below. I am aware that the same Collection View is used between Controllers when this Transition effect is in effect. But, why that collection view is not reloading when transition is happening. I even tried Reloading the collection view an that too failed. There should be some simple point I should be missing. Help me please.

Do apple allow custom iOS 5/6 style UI for iOS7?

耗尽温柔 提交于 2019-12-21 06:01:05
问题 Hi I compiled an app in XCode 5 and all the UI changed. I was forced to customize the Navigation Bar and TabBar to make it look like iOS 5/6. Does Apple HIG prevent us from using Opaque Black navBar and TabBar in iOS 7? 回答1: Well no, it doesn't necessarily mean that if your apps are running in iOS7, it needs to immediately have the new look. You can use iOS 7.0 as your base sdk but you need to do a custom modification in your app to implement the look and feel of iOS5/6 (but this is a tedious

Crash in iOS 7.0.3 for NSMutableAttributedString [duplicate]

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-21 05:56:16
问题 This question already has answers here : What happened to “HelveticaNeue-Italic” on iOS 7.0.3 (10 answers) Closed 6 years ago . Since a few days, I have a crash that only happens in iOS with the following line of code [myAttributedString addAttribute:NSFontAttributeName value:[UIFont fontWithName:@"HelveticaNeue-Italic" size:myLabel.font.pointSize] range:rangeOfSubString]; The reason given by debugger is "Terminating app due to uncaught exception 'NSInvalidArgumentException', reason:

iOS 7 iAd interstitial ads can not be closed by user

只愿长相守 提交于 2019-12-21 05:47:07
问题 when i display interstitial ads with [interstitial presentFromViewController:self]; i get the warning that this method is deprecated in iOS 7. But it still works fine! When i display the ad view with [self requestInterstitialAdPresentation]; [interstitial presentInView:self.view]; i get no warning and the ad is loading but there is no (X) in the ad that the user can close the ad. Do somebody knows how to fix this? 回答1: hey there this is the troublemaker [interstitial presentInView:self.view];

Sprite Kit bodyAtPoint and bodyInRect return incorrect values?

时光总嘲笑我的痴心妄想 提交于 2019-12-21 04:57:04
问题 I created a very simple sample code, just one scene, one sprite node 20x20px, at point 0.0 on screen. When I call scene.physicsWorld bodyAtPoint it returns me this node even at point eg: 34x34. But at point 35x35 it returns null . So basically all points from 0px to 34px in both axis returns this node, starting from 35px, it doesn't return it anymore. Any idea what could be the reason, if sprite visibly ends at 20px 20px? The same behaviour is seen in bodyInRect . Here is the sample code: -