ios8

Xcode 6 UIVisualEffectView in Storyboard

北慕城南 提交于 2019-12-07 00:33:22
问题 I am looking around the Object Library in Xcode 6 for UIVisualEffectView to add a blur in Storyboard. I know how to do this programmatically, but I can't find a way to do this in the Storyboard. Is this unavailable in the current beta, or is there a way to do this that is not so straightforward? 回答1: iOS 8.0 Gold Master UPDATE As of the iOS 8.0 Gold Master, Xcode now has a UIVisualEffectView available in the Objects Library. To add a UIVisualEffectView to your Storyboard, just drag it from

Dynamic UITextView size based on content in Swift

会有一股神秘感。 提交于 2019-12-06 22:41:47
问题 I don't suppose someone could guide me on the proper way to dynamically size a UITextView while still using Auto-Layout? Using Swift, that is. I've tried programmatically adjusting the bottom constraints in attempt to get the UITextView to hug the content. But I'm not sure how to get the height of the content of the UITextView? I'm attempting to load data into UITextView fields, then, dynamically adjust them to look neat. @IBOutlet weak var serviceDescriptionTextViewBottomGuide:

Cancel button is not showing for a UIAlertController in iPad, iOS8 and in objective-C

青春壹個敷衍的年華 提交于 2019-12-06 22:22:19
问题 I am trying to use UIAlertController. I need a popover with two buttons -- "Cancel" and "Delete and Sign Out". But I can only see the "Delete and Sign out" button and not the cancel button. Here is the code:- NSString *confirmText = "Hi"; UIAlertController *alert = [UIAlertController alertControllerWithTitle:confirmText message:@"" preferredStyle:UIAlertControllerStyleActionSheet]; // Created a deleted action UIAlertAction *destroyAction = [UIAlertAction actionWithTitle:@"Delete and Sign Out"

UITableViewCell not clipping to bounds in editing mode in iOS8 (works in iOS7.1)

[亡魂溺海] 提交于 2019-12-06 21:48:39
问题 I am setting the height of a UITableViewCell so that it will clip and not all the content for the row is visible. This works fine in iOS7 both "not edit" mode and "edit" mode. In iOS8 it is only working in "not edit" mode. When editing the entire content of the cell is shown after the red delete button on the left is tapped so that you see the delete button on the right. I had been setting cell.clipsToBounds = YES and thought this was all I needed to do. EDIT : I also tried cell.contentView

Can't see custom keyboard in Safari of iOS8.1 simulator

℡╲_俬逩灬. 提交于 2019-12-06 19:07:59
问题 After update to Xcode 6.1, I lost my custom keyboard in Safari of iOS8.1 simulator. But it's still come in photo app. Photo app can switch to my custom keyboard, but Safari still display English and Emoji, other system keyboard like Arabic also not work. I reset simulator but not work. It's look nothing change in Safari in iOS8.1.I try to clear DerivedData folder but it no help. I remove Xcode and reinstall from Appstore, not work too. I must test on my device, too strange. Does anyone have

iOS 8 Launch Image File - Navigation Bar and the Status Bar

守給你的承諾、 提交于 2019-12-06 18:58:52
问题 I'm using Interface Builder to make the launch image file for iOS 8. The launch image that I want is very simple (same as the Settings app, I think) - Navigation Bar at the top with an empty, Grouped TableView. No title, etc. Note, I don't normally use Interface Builder - so the IB thing is completely new to me. I'm trying to achieve this by adding a Navigation Bar and Table View to the View - and then setting up the constraints. The constraints (and colours) are working fine, but... The

How to display an image from Asset Catalog in Today Extension?

混江龙づ霸主 提交于 2019-12-06 17:24:13
问题 I'm working on a Today Extension for iOS8. My App Group is set up correctly and I can successfully use NSUserDefaults to send simple bits of data to my extension (using this tutorial). In the storyboard for my extension, I've placed an image onto the storyboard and set the image to be an asset I have in my Asset Catalog. Even though it appears in Interface Builder, when I run the app on a device and simulator the image doesn't display. What am I missing? 回答1: Make sure the asset catalog is

How would I use polymorphism to allow a method to accept multiple classes, but with IBOutlets?

自闭症网瘾萝莉.ら 提交于 2019-12-06 16:48:13
问题 I have a specific method that accepts a UIView object, and I want to pass objects to it that can be of one of two classes. So say it accepts a UIView that represents an animal, I want to be able to pass a DogView and a CatView or other animal-type classes potentially. Within that method I want to set the nameLabel view, which all animals have. How do I set it up so I'd be able to do this? My first reaction was to have a super class (such as AnimalView ) that has the nameLabel variable on it,

google cardboard application in ios without using unity

倖福魔咒の 提交于 2019-12-06 16:25:50
问题 I'm trying to make a spherical 360 video in my ios app with the Google Cardboard SDK.I have seen that all tutorials and samples talking about unity. I am not familiar with unity or GL.Is there any way to do this without using unity ? 回答1: Yes there's now an official SDK for iOS that doesn't require Unity. https://developers.google.com/cardboard/ios/ Also for a simple 360 video player, check out VR View: https://developers.google.com/cardboard/vrview 回答2: You can try EleVR the web player seems

Autolayout is not updating frames instantly in iOS8-Xcode6

心不动则不痛 提交于 2019-12-06 16:14:20
I'm using autolayout in XCode6 . I have applied the following constraints to a scrollview . I have tried to access the frame of this scrollview in - viewDidLoad and - viewWillAppear methods for iPhone 4Inchs device. Here problem is, the scrollview's width is showing 600 in Log. But the width should be 300 in 4Ichs device as i'm using autolayout . Seems autolayout will apply after some time interval. It is showing correct width in - viewDidAppear method as 300. Is there any way to access the original frames in - viewDidLoad and - viewWillAppear methods ? Thanks in advance. Auto layout doesn't