ios10

Get host name From IP address iOS 10

爱⌒轻易说出口 提交于 2020-01-03 19:34:30
问题 I need to fetch host name from ip address . Am able to fetch ip, mac addresses of all devices connected to my devices network, but hostname always returns nil . i had tried below code snippets to retrieve hostname but it always returns nil in my network CODE SNIPPET 1 +(NSString *)getHostFromIPAddress:(NSString*)ipAddress { struct addrinfo *result = NULL; struct addrinfo hints; memset(&hints, 0, sizeof(hints)); hints.ai_flags = AI_NUMERICHOST; hints.ai_family = PF_UNSPEC; hints.ai_socktype =

How to chain filters in Metal for iOS?

谁说我不能喝 提交于 2020-01-03 15:26:29
问题 I completed this tutorial by Simon Gladman (@flexmonkey) to capture images from AVFoundation and apply a filter to the output. However, I'm struggling to find a way to replace the blur filter with my own compute shader. In other words, I need to concatenate my custom shader after the YCbCrColorConversion filter mentioned there. let commandBuffer = commandQueue.makeCommandBuffer() let commandEncoder = commandBuffer.makeComputeCommandEncoder() // pipelineState has compiled YCbCrColorConversion

Xcode 9, iOS 10 issue with Assets

ⅰ亾dé卋堺 提交于 2020-01-03 13:05:53
问题 I'm having a problem with assets and Xcode 9 beta running on devices with iOS 10. It doesn't upload any image from assets, so on the phone I can't see any asset! If I load images in the storyboard, it just doesn't show any image on the phone (but it shows in the storyboard), if I do something: UIImage(named:"imageName")! It crashes with log message: *** Assertion failure in -[_CUIThemePixelRendition _initWithCSIHeader:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-428.6

Xcode 9, iOS 10 issue with Assets

≯℡__Kan透↙ 提交于 2020-01-03 13:04:34
问题 I'm having a problem with assets and Xcode 9 beta running on devices with iOS 10. It doesn't upload any image from assets, so on the phone I can't see any asset! If I load images in the storyboard, it just doesn't show any image on the phone (but it shows in the storyboard), if I do something: UIImage(named:"imageName")! It crashes with log message: *** Assertion failure in -[_CUIThemePixelRendition _initWithCSIHeader:], /BuildRoot/Library/Caches/com.apple.xbs/Sources/CoreUI/CoreUI-428.6

Calculate UIWebView Content dynamic Height using 'document.body.scrollHeight;' returns bigger value in iOS 10

我与影子孤独终老i 提交于 2020-01-03 08:15:14
问题 I am creating on an application using Objective C, where I'm using a UIWebView to display contents in HTML format. I am using below code in UIWebView delegate method webViewDidFinishLoad NSUInteger contentHeight = [[aWebView stringByEvaluatingJavaScriptFromString:[NSString stringWithFormat:@"document.body.scrollHeight;"]] intValue]; to calculate the webview content height, this is working fine in iOS8 , iOS9 and iOS11 but in iOS10 iPhone mobiles the content height returning a much bigger

window.outerWidth is 0 in Safari on iOS 10 beta

做~自己de王妃 提交于 2020-01-03 07:23:08
问题 Using an iPad with iOS 10 installed, I entered window.outerWidth in the browser console and got a value of 0 . OTOH, window.innerWidth correctly produced 1024 (landscape mode). In iOS 9, window.outerWidth correctly produced 1024 , so is this just a bug in the iOS 10 beta or is there a subtlety to this property that I'm missing? 回答1: The issue is more than just the iOS 10 Beta, but I doubt it is a priority for Apple Devs to fix as iOS devices don't really have an external frame on the sides of

iPad Pro scale up from iPad application and Launch Screen file - iOS 10

ぐ巨炮叔叔 提交于 2020-01-02 14:37:30
问题 I have an ipad application that I would like to run on iPad pro, but when I run it, it only occupies one corner of the screen like so: Now, another stackoverflow question asked the same question and the response was to remove the launch screen file and not to give the OS any hardcoded information about the device size it's going to run on. I did it and it scaled my app to full screen BUT.. It created another iOS10 specific bug that happens if you don't specify the launch screen: iPad

IOS Coredata compatible with both IOS 9 and ios 10

孤街醉人 提交于 2020-01-02 09:59:52
问题 Hi I'm developing an app to work with both IOS 10 and 9 (xcode 8). What is the proper way to create new entity object? new IOS 10 has this code var newEvent = Event(context: context) How do we make this code work with both IOS 10 and 9? I'm testing using Mater-Detail template with coredata xcode8 Any additional change should we make to ensure coredata work with both IOS 9 and 10? any help is much appreciate. Thanks 来源: https://stackoverflow.com/questions/39687249/ios-coredata-compatible-with

How to disable UIAlertAction depending on UITextField in UIAlertController?

末鹿安然 提交于 2020-01-02 04:45:08
问题 I'm using a UIAlertController to present the user with a dialog to enter a 5 digit CRN . I want the Add button to be disabled until there are 5 and only 5 digit in the UITextField . Here's what the UI looks like : Here's the properties setup for the UIAlertController : var alertController: UIAlertController! var addAlertAction: UIAlertAction! { return UIAlertAction(title: "Add", style: .default) } Here's how I'm initializing them in the viewDidLoad method : self.alertController =

Why the Xcode 8 (iOS 10) print [LogMessageLogging] <private> in console

不羁的心 提交于 2020-01-02 03:40:10
问题 Why does Xcode 8 (iOS 10) print [LogMessageLogging] <private> in the console, when I call the map view? Can any one give some suggestions? 回答1: Privacy The unified logging system considers dynamic strings and complex dynamic objects to be private , and does not collect them automatically. To ensure the privacy of users, it is recommended that log messages consist strictly of static strings and numbers . In situations where it is necessary to capture a dynamic string, you may explicitly