Search results for

Swift 6

49,202 results found

Post

Replies

Boosts

Views

Activity

Install legacy Java?
After installing OS X 10.11, some apps now gives me To open 'this Java application' you need to install the legacy Java SE 6 runtime.However, the Java in this link now refused to install. What can I do?https://support.apple.com/kb/DL1572?viewlocale=en_US&locale=en_US
2
0
646
Jun ’15
Reply to Any news on reflection in Swift 2.0?
They showed simple enum type names printing properly during the What's New In Swift session that can be streamed from WWDC.In Swift 2 / Xcode 7 beta, it seems that enums imported from ObjC still have issues, and only simple Swift enum types are printable.let strX = this is (NSRoundingMode.RoundPlain) // this is C.NSRoundingMode enum TestBasicEnum { case Option1 case Option2 } let strY = this is (TestBasicEnum.Option1) // this is TestEnum.Option1 enum TestRawEnum: String { case Option1 = text1 case Option2 = text2 } let strW = this is (TestRawEnum.Option1) // this is TestEnum.Option1 enum TestRichEnum { case Option1 (String) case Option2 (String) } let opt = TestRichEnum.Option1(text) let strZ = this is (opt) // this is TestRichEnum
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Swift and Mathematics
Yes, Swift should provide more built in functions.For maths, it should speak the language of mathematicians, not of computer scientist.I posted a similar comment for set related functions, where syntax is at odds with the language used for set theory.I expect it from Apple, they learn the (math) language to the machine and not force users to learn machine language.PS: similar for string manipulation which remains very cumbersome with the range ; I would appreciate a more direct manipulation.
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Reply to Two Generic Types or One
Not entirely sure if this does what you want, but:protocol Entity { typealias Identifier: Equatable var identifier: Identifier { get } } protocol EntityDAO { typealias EntityType: Entity var entities : [EntityType] { get } } struct Person: Entity { typealias Identifier = String let identifier: String } struct PersonDao: EntityDAO { typealias EntityType = Person let entities: [Person] } extension Person: CustomStringConvertible { var description: String { return identifier } } func test() { let a = Person(identifier: Marge) let b = Person(identifier: Batman) let c = Person(identifier: Yoda) let groupOfPeople = PersonDao(entities: [a, b, c]) print(groupOfPeople) } test() // (For Swift 1.2 instead of 2.0: Replace CustomStringConvertible with Printable, and print with println.)
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Mistake in Apple's Crustacean.playground?
I had a look at the Crustacean.playground (which demonstrates protocol oriented programming), available here:https://developer.apple.com/swift/resources/It's a great demonstration but it seems to contain a small mistake in that it says:// Note: the fact that rectangleAt doesn't appear below, but // circleAround does, serves as a demonstration of how dispatching through // protocols works: methods in protocol extensions that don't match a // requirement (such as rectangleAt) are dispatched statically.It is true that rectableAt appears above and not below, but there is no circleAround at all in the output, and there isn't even any circleAround method, just circleAt, which is not appearing anywhere in the output either.Tell me if I'm misunderstanding something, or please correct this otherwise great playground.
6
0
1.4k
Jun ’15
Must call a designated initializer of the superclass 'UITableView'
Hello guys,I subclassed UITableView, and before the migration to Swift 2.0, I didn't have any issue compiling the following code.Now I get : Must call a designated initializer of the superclass 'UITableView'Can you please help me ?init(headerView: UIView, othertriggerViews: UIView...) { super.init(frame: CGRectZero) header = headerView var helper = [UIView]() helper.append(header!) helper = helper + othertriggerViews trigger = helper initialize() self.setTapGestureRecognizers() } init() { super.init(frame: CGRectZero) initialize() } required init(coder aDecoder: NSCoder) { super.init(coder: aDecoder) initialize() } init(frame: CGRect) { super.init(frame: frame) initialize() } override init(frame: CGRect, style: UITableViewStyle) { super.init(frame: frame, style: style) initialize() } / private func initialize(){ self.offset = 20 self.initialHeight = self.frame.size.height self.customBackgroundView = UIView(frame: self.frame) self.backgroundView = self.customBackgroundView! }
1
0
15k
Jun ’15
The operation couldn’t be completed. Ad inventory unavailable.
Hi everyone!I'm creating my app in swift and I'm testing the iAd too. Yesterday, after the link with iTunesConnect, my app showed about 10 Ad, but after this 10 Ad, it give me ever an error when I try to show the Ad. It say me :The operation couldn’t be completed. Ad inventory unavailable. I just went in settings and I setted the Fill Rate to 100%, for testing, but it send me the same error...Who can help me?Thanks!Giorgio
2
0
1.2k
Jun ’15
Apache Thrift
Hi,I realize I might be in the wrong thread but didn't find the perfect one, I'd appreciate if someone would point me to it if there is a better one.I want to use Apache Thrift with Swift. All searches I make give me some other Swift library.If there isn't one, I'd be happy to contribute to a Swift version of Apache Thrift but I'm not sure if I am up for the task of doing it all myself.Thanks in advance for any pointers or hints./Peter
3
0
1.5k
Jun ’15
Reply to Apache Thrift
Hi Peter,you can use the Objective-C library with Swift. We are using this at our company and it works with no problems. I'm not sure if there are any plans at Apache to make a Swift version.Regards, Arne
Topic: Programming Languages SubTopic: Swift Tags:
Jun ’15
Answer to Java SE 6 problem for El Capitan
Hello! I have searched around the web for finding a solution to the Java SE 6 Runtime that cannot be installed and doesn't allow apps to work as suppose. So while searching the web I found different articles about uninstalling it and deleting the newer version...ect. Nothing worked so I thought what if you go the opposite way instead of deleting it you make your apps think that your Java SE 8u45 is your Java SE 6. Well this article finally helped me http://stackoverflow.com/questions/19563766/eclipse-kepler-for-os-x-mavericks-request-java-se-6/19594116#19594116You will have to change the code and add your version of Java and dont forget to log out and back on!!!HOPE THIS HELPS!!!
1
0
491
Jun ’15