ios9

Set a faded darker background to a UINavigationBar

北慕城南 提交于 2019-12-25 06:13:26
问题 I'm trying to set a faded darker background to a navigation bar, as you can see on the image below. I've tried with this code but it's not exactly what I expect. UINavigationBar.appearance().backgroundColor = UIColor(red: 0, green: 0, blue: 0, alpha: 0.4) I've found this topic, but without suitable answer: Shows a faded gray color view through iOS 7 Navigation bar of a UISplitViewController Any idea will be appreciated. EDIT 6 oct 2015 : If somebody needs to know how to perform that For Swift

Navigation Bar and Search Controller

孤街浪徒 提交于 2019-12-25 05:17:17
问题 I want my navbar and search bar to be the same color. I also want to get rid of the hairline between them but that seems a minor issue compared to the first one. The navbar attributes are set this way: self.navigationController?.navigationBar.barTintColor = ColorHelper.sharedInstance.LightPink() if let navBarFont = UIFont(name: "HelveticaNeue-Light", size: 25.0) { let navBarAttributesDictionary: [String: AnyObject]? = [ NSForegroundColorAttributeName: UIColor.whiteColor(), NSFontAttributeName

UIStackView properties according to size classes

妖精的绣舞 提交于 2019-12-25 04:42:47
问题 I try to test the UIStackView in a storyboard where I change the property "Axis" based on the orientation of an iPhone (wAny/hC, wC/hR). Unfortunately, at running, the change is not applied. Specifically, the property "Axis" is modified (inspected in Xcode), but the layout will not change. Thank you in advance for your help. 回答1: This is definitely a bug. The behavior of the axis at runtime (simulator or device), after closer inspection, only changes for every other UIStackView in the view

UIView do not react on Apple Pencil

╄→гoц情女王★ 提交于 2019-12-25 04:34:21
问题 In my app some of UIView s don't react on Apple Pencil. When I make touch by finger, all works fine. I supposed that this might be caused by adding new property type in iOS 9. And I tried to change the type of touches: touch.type = UITouchTypeDirect; But this is readonly property. Does exist any way to make equal touch by finger and touch by Apple Pencil? How do I make my app react on Apple Pencil? 回答1: UITouch class determines whether the touch is made by a stylus or by a finger, as stylus

How to tap cell's buttons in UITableViewCell without actionning the cell's segue

隐身守侯 提交于 2019-12-25 03:53:45
问题 My custom cell have 2 buttons, and each custom cell also perform a segue. The segue is functionning properly, the problem come from the fact that my buttons are never fired. If I click on them then the segue is fired, but not the button. How to overcome this? Here goes the code of how the button's actions are defined : In the table view controller override func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell { let cell = tableView

Can I off the ATS and upload application to App Store? - IOS 9

只愿长相守 提交于 2019-12-24 16:37:32
问题 I want to update the application to App Store and off the ATS. Does Apple allow the application to off ATS and live to App Store? 回答1: Yes. Apple allows temporary configuration to load insecure HTTP Arbitrary loads. You may opt out from ATS by following their official latest technote for ATS. You can also find examples for configuration as per your requirement here and implement it in your project to publish it in AppStore. 来源: https://stackoverflow.com/questions/32730115/can-i-off-the-ats

Custom UiCollectionViewCell class init not being called

回眸只為那壹抹淺笑 提交于 2019-12-24 16:30:10
问题 Hi I'm using this code to try and make the text resize though I can't seen to get the label to resize. Also the init method in the custom class is not being called. Here is my code: class Cell: UICollectionViewCell { @IBOutlet weak var label: UILabel! override init(frame: CGRect) { super.init(frame: frame) print("init—>Not being called???\n") self.label.adjustsFontSizeToFitWidth = true self.cell.label.sizeToFit() } required init?(coder aDecoder: NSCoder) { super.init(coder: aDecoder) } } What

NSAppTransportSecurity UIWebView issue

核能气质少年 提交于 2019-12-24 16:16:02
问题 I have these lines in my info.plist file: <key>NSAppTransportSecurity</key> <dict> <key>NSExceptionDomains</key> <dict> <key>mysebserver.com</key> <dict> <key>NSIncludesSubdomains</key> <true/> <key>NSTemporaryExceptionAllowsInsecureHTTPLoads</key> <true/> <key>NSTemporaryExceptionMinimumTLSVersion</key> <string>TLSv1.1</string> </dict> </dict> </dict> So it works perfect with my API calls. In my view controller I have UIWebView that tries to display web content: NSURLRequest* request =

How to save video clip to Photos gallery - ios 8 & 9

大城市里の小女人 提交于 2019-12-24 13:39:35
问题 I had work out to save video clip to Photos gallery. Here the code as below, but it not working. Even though the saveVideo return true, but I open Photos gallery can not get the video clip. filepath is the location on local Document directory func saveVideo(filePath: String) { UISaveVideoAtPathToSavedPhotosAlbum (filePath, self,"video:didFinishSavingWithError:contextInfo:", nil) } func video(filePath: String, didFinishSavingWithError error: NSError?, contextInfo:UnsafePointer<Void>) { if

Core Data attribute on relationship?

牧云@^-^@ 提交于 2019-12-24 13:39:35
问题 I'm just getting started with Core Data. I have a Headache entity and a Medication entity. There is a many to many relationship between Headaches and Medications. When you add a headache, you can choose multiple medications. I want to be able to specify quantities of those medications. I am more familiar with MySQL, where you would create a pivot table and include the quantity in the pivot table along with the headache_id and the medication_id so each instance could have a quantity. Is there