ios9

UIActivityViewController on iPad

你离开我真会死。 提交于 2019-12-06 11:53:34
I have been using the code below to show a UIActivityViewController which worked fine when I was using Xcode 6, Swift 1.2 and iOS 8. However when I updated it shows the UIActivityViewController but it is completely blank without any of the sharing options. Do you have any suggestions? if UIDevice.currentDevice().userInterfaceIdiom == .Pad { let textToShare = textViewOne.text let objectsToShare = [textToShare] let activityVC = UIActivityViewController(activityItems: objectsToShare, applicationActivities: nil) let nav = UINavigationController(rootViewController: activityVC) nav

How to draw a semi-circle using swift iOS 9 and on the basis of one value draw angle and fill that only part with color

℡╲_俬逩灬. 提交于 2019-12-06 11:10:43
I want to draw the two semi circles like this as shown in picture (the below one) I'm trying it but did not get anything. Tried some chart api and a few code to draw pie chart from stackoverflow but they need to edit and I don't know about Core Graphics. I am working on Xcode 7.3.1 and iOS 9. My Question is: How do I draw a semi-circle which take one value and first convert that value to get its equivalent angle and then draw an arc of this angle and fill color in that part? Codo The below code runs in the XCode iOS Playground. It creates a custom UIView class and draws two pie slices. The

UIScreen mainScreen in Xcode 8

て烟熏妆下的殇ゞ 提交于 2019-12-06 10:50:17
问题 We have a problem with iOS SDK in Xcode 8. We use method [UIScreen mainScreen] in our project. This method is available from iOS 2.0. But when we built product in Xcode 8 and submited it for review, app was rejected. Surprise: in the new SDK ( Xcode 8 GM ) this method marked as “ available from iOS 10.0 ”. In other words - now iOS 9 identifies [UIScreen mainScreen] as “ non-public API ”. Perhaps this is Apple’s bug. Our question: 1) We want to continue using this method. 2) We want to support

Using the fontWithSize API with San Francisco

和自甴很熟 提交于 2019-12-06 10:36:18
The new San Francisco fonts in iOS 9 are optimized for the size it will be used at, by adjusting tracking and dynamically switching between SF Display and SF Text. It was noted in the WWDC session #804 developers should not use San Francisco by attempting to initialize a UIFont using fontWithName , for example: UIFont *originalFont = [UIFont systemFontOfSize:11]; UIFont *newFont = [UIFont fontWithName:originalFont.fontName size:44]; This is because the system cannot optimize the font for the new size when using the fontWithName API. Instead it was recommended to get the UIFontDescriptor from

iOS 9 New Launch Images and Icons Sizes, has anyone found the new sizes for the upcoming devices yet?

僤鯓⒐⒋嵵緔 提交于 2019-12-06 09:19:16
问题 For iOS 9 has anyone been able to discover what the new launch image and icon sizes will be for the new upcoming iOS devices? I checked the Human Interface Guidelines but they have not listed anything yet https://developer.apple.com/library/prerelease/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html#//apple_ref/doc/uid/TP40006556-CH27-SW1 In Xcode 7 I tried adding a new asset catalog in hopes of discovering them but that was without success. I'm not sure when we found out

Xcode7制作framework教程 iOS9

放肆的年华 提交于 2019-12-06 08:18:19
Demo地址: https://github.com/ma762614600/iOS_Framework 第一步:制作framework 原文链接: 打包自己的framework(Xcode7&OSX10.11)兼容各种cpu类型 第一步:新建Framework项目 第二步:编写代码,构建完成项目 第三步:新建一个我们用来运行编译脚本的Target 第四步:在新建的Target里边添加一个脚本 第五步:填入脚本 第六步:运行并根据需要编译 # Sets the target folders and the final framework product.# 如果工程名称和Framework的Target名称不一样的话,要自定义FMKNAME# 例如: FMK_NAME = "MyFramework"FMK_NAME=${PROJECT_NAME}# Install dir will be the final output to the framework.# The following line create it in the root folder of the current project.INSTALL_DIR=${SRCROOT}/Products/${FMK_NAME}.framework# Working dir will be deleted after the

List the Versions of all the applications installed in iOS device programmatically

馋奶兔 提交于 2019-12-06 08:09:19
I need to get the Versions of all the installed applications programmatically for non-jailbroken iOS devices. Is it Possible to achieve this? Mahendra Kumar That's possible, please try the below code. Class LSApplicationWorkspace_class = objc_getClass("LSApplicationWorkspace"); NSObject* workspace = [LSApplicationWorkspace_class performSelector:@selector(defaultWorkspace)]; for (LSApplicationProxy *apps in [workspace performSelector:@selector(allApplications)]) { NSString *localizedName = apps.localizedName; if([apps.applicationType isEqualToString:@"User"]) { NSLog(@"\nlocalizedName: %@"

How can we disable the effect of enabled “bold text” from settings in the iphone (in my app)? - swift 2.0

試著忘記壹切 提交于 2019-12-06 07:37:19
If the user’s device has bold text enabled there are certain parts of the system that will automatically respond to that. For example, if you are using a default navigation controller in your app, the title and the UIBarButtonItem at the top of the screen will become bold. How can I disable the effect of bold text to all my app and specially to the default navigation controller ( to the title and the UIBarButtonItem ) in my app ? - swift 2.0 ( iOS 8 & 9 ) . thx all : ) I have this code to detect if the bold text is enabled : ( if it is useful ) if (UIAccessibilityIsBoldTextEnabled()) { // use

Over the air app installation is stopped working on iOS 9

耗尽温柔 提交于 2019-12-06 06:47:11
问题 I have upgraded my device with iOS 9. I am manually generating plist and ipa file but suddenly it stopped installing in ios 9 while it was working fine with iOS 8. below items assets <dict> <key>kind</key> <string>software-package</string> <key>url</key> <string>https://www.eg.com/urland.ipa</string> </dict> <dict> <key>kind</key> <string>full-size-image</string> <key>needs-shine</key> <true/> <key>url</key> <string>https://www.eg.com/imageurl/iTunesArtwork.png</string> </dict> <dict> <key

swift dismiss modal and push to new VC

戏子无情 提交于 2019-12-06 06:22:06
I have tableview... 1 table showing a new modal window and when I press the button I want to dismiss the modal window and push to VC. My code only hide the modal view but no push is made. @IBAction func registrationBtn(sender: AnyObject) { let openNewVC = self.storyboard?.instantiateViewControllerWithIdentifier("registrationVcID") as! RegistrationVC self.dismissViewControllerAnimated(false, completion: { () -> Void in self.navigationController?.pushViewController(openNewVC, animated: true) }) } You should create a protocol protocol View1Delegate: class { func dismissViewController(controller: