ios8

UISearchBar barTintColor clearColor error in iOS 8.0

ⅰ亾dé卋堺 提交于 2019-12-07 16:31:21
问题 In my app i am using UISearchBar in xib with Xcode 6. And i have given bar tin color is clear color. It's working on iOS 7.1 below. But main problem is in iOS 8.0 it's not working clear color. It's displaying black color. See Image : Any one having adventurous of this issue. 回答1: I had the same problem in search bar so i changed the Search style from default to Minimal . And it changed the bar style. 回答2: You can add a 1x1 pixel transparence image as background image to UISearchBar. It would

How to add the project prefix file to photo extension target?

倾然丶 夕夏残阳落幕 提交于 2019-12-07 15:55:41
问题 The main target typically contains a -Prefix.pch file where all the convenience imports are defined. E.g when using opencv with c++ there is #ifdef __cplusplus #import <opencv2/opencv.hpp> #endif #ifdef __OBJC__ #import <UIKit/UIKit.h> #import <Foundation/Foundation.h> #endif Unfortunately when using the new Photo Extension target in iOS 8, this file gets ignored making it a hassle to add all the files required in the extension target. Is there a way to make this Prefix file work also for the

iOS: Using HanekeSwift with SwiftyJSON

南楼画角 提交于 2019-12-07 15:53:53
问题 I use Alamofire with SwiftyJSON in my current swift project. I would like to add HanekeSwift for caching. Adding HanekeSwift to the project make it "collide" with SwiftyJSON struct JSON. Is there any easy way to use both of these frameworks? I know there is a option to rename one of the JSON structs but seems like a stupid workaround. Or do some namespace thing. Error message: 'JSON' is ambiguous for type lookup in this context Any solutions to this? 回答1: So, the solution that I've found

How to pass array by reference without function ? swift

孤街浪徒 提交于 2019-12-07 15:20:24
问题 I have this class: class MainView:UIView{ var categories:[Category]! } i want to set the categories arg, but i need to pass it by reference not value. because it's more efficient and better. so if i did this: let mainView = MainView() mainView.categories = categoriesData. then it pass it by value. if i need to pass it by reference i could do that by using function inside the MainView() class MainView:UIView{ var categories:[Category]! fun setCategories(inout categories: Int){ self.categories

Enabling In-App purchase for custom keyboard iOS8

元气小坏坏 提交于 2019-12-07 15:17:07
问题 I am building a custom keyboard for iOS and I want to know how can I enable in-app purchases for that? The documentation states that I can enable in-app purchases through the containing app, but I am not sure what that means (technically)? Has anyone built iPhone extensions with in-app purchasing that could give me some guidance? 回答1: An extension is bundled with an app. When the user downloads the containing app, the extensions are available for the user to add to their keyboard list, today

ios8 autolayout: BOTH multi-line(maybe 0 line) label

懵懂的女人 提交于 2019-12-07 14:28:17
问题 I wanna display two UILabels(Title, Subtitle) in a cell. for Title : multiple line > 0 for Subtitle : 0 ≤ multiple line ≤ 2 A bug here (say, title&subtitle are both 2 lines, cell's indexPath.row = 1): The first time I run the simulator, title only shows 1 line and subtitle shows 2 lines. After I scrolled the tableView and back to the first indexPath.row, it display correctly! It seems like this: First time: ————————————————— This is the tile, and it should display... This is the subtitle, and

Implementing functions in swift

天涯浪子 提交于 2019-12-07 13:53:25
问题 I am new to swift and trying to implement a simple function that takes minimum and max number as input and returns an array with all the numbers in the limit. I am getting an error //Error: Reference to generic type 'Array' requires arguments in <...> may I know what I am missing on? func serialNumberLimits(minimumNumber n1:Int, maximumNumber n2:Int) -> Array { // Initialized an empty array var array = Int[]() //Initialized a "Temp" variable var temp:Int = 0 for index in n1..n2 { temp += n1

How to build iOS framework with XCode 6

匆匆过客 提交于 2019-12-07 12:49:42
问题 I know of familiar tutorials on this, but introduction of framework XCode 6 template has changed the game. I already watched WWDC 2014 video about building modern frameworks but it talks more about building extensions, framework & app all inside single project. It does not specify if the framework I make with it is truly reusable across any project. I am building framework the XCode 6 way (File->New Project->Framework and Library->Cocoa Touch Framework), but when I import it inside my test

UIImagePickerController hiding status bar issue in iOS8

爷,独闯天下 提交于 2019-12-07 12:43:22
问题 I did this - (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated { [[UIApplication sharedApplication] setStatusBarHidden:YES]; } and it is great in iOS7, but iOS8 have some trouble with transitions in navigation bar between views and says: Finishing up a navigation transition in an unexpected state. Navigation Bar subview tree might get corrupted. So, is any known solution to that? 回答1: Try