Search results for

Swift 6

49,189 results found

Post

Replies

Boosts

Views

Activity

Command-click to see Swift representation of Objective-C API in Xcode
A number of questions asking how to call various Objective-C APIs in Swift, or why overriding certain methods or properties doesn't work, can be answered just by looking at the Swift representation of the Objective-C API.In Xcode, simply Command-click on a symbol (such as NSView or UIView) and Xcode will present the corresponding header file as it is represented in Swift, for example:The API Reference in the documentation also shows both Swift and Objective-C forms:
0
0
2.6k
Jun ’15
App Store on iPad FAQ
Welcome to the App Store on iPad FAQ. We are seeing a lot of questions about the App Store on iPad repeated in many threads and will attempt to collect answers for them here.If you have questions about submitting an app to the App Store for iPad, be sure to check out the iPad App Submissions FAQ on https://devforums.apple.com/thread/44142first.Questions & Answers:1. I'm not seeing any Universal apps show up on the Top Charts? Are Universal apps included in Top Charts?Yes, Universal apps are included in Top Charts.2. How does charting on the App Store work for Universal apps? Are they counted on the iPhone side or the iPad side?When a Universal app is purchased on the iPad, it is counted towards the iPad chart. If a Universal app is purchased on iPhone, it counts towards the iPhone chart. If a Universal app is purchased on a Mac + PC, it counts towards the iPhone chart.3. Can customers buy iPad-only apps on iPhone?No. The App Store on iPhone only shows iPhone and Universal apps, both of which will work on
0
0
1.8k
Jun ’15
Storyboard UIView Objects Not Instantiating
I am working on a project with Swift and Storyboards. It's a conversion project from a traditional IB and Objective-C project. I am having an issue with a UITableView instantiating when the view is loaded. Let me explain.The project is a navigation project. Here is an overview of the Storyboard.The Storyboard's first viewController is HomeViewController and is a landing page that displays general info. The next VC is called FeedViewController shows a number of RSS feeds. You can see an expanded screen shot of the NavigationController, HomeViewController and FeedViewController in the picture below.My problem is that I can't get the tableView to Instantiate. I first checked to make sure that my tableView was connected as an outlet and that the dataSource and delegate properties were connected. You can see this in the pic below.In my FeedViewController class I have an Outler property called feedsTableView. You can see the declaration in the code below.class FeedViewController: UIViewController, UITableV
5
0
2.5k
Jun ’15
Synchronizing Live Video Multiple AVPlayers
Hello, I am currently trying to synchronize two or more AVPlayers, each with a different player item (camera angle), but I am unable to get all of the player to start playing at the same time. I am also working with live video, so I don't think I can use AVCompositions.Current Procedure:Pause all playersSeek all players to the desired timeIf all seeks completed then Preroll all playersIf all prerolls completed then tell all players to PlayCode:- (void)syncAtTime:(CMTime)time { __block NSArray *players = self.players; const NSUInteger prerollsNeeded = players.count; __block NSUInteger prerollsTried = 0; __block NSUInteger prerollsCompleted = 0; void (^prerollHandler)(BOOL) = ^(BOOL complete) { prerollsTried++; if (complete) { prerollsCompleted++; } if (prerollsTried >= prerollsNeeded) { // all preroll completion handlers have ran // play all the players now that they SHOULD be ready if (prerollsCompleted >= prerollsNeeded) { for (AVPlayer *player in players) { [player play]; } } } }; const NSUInteger see
7
0
7.4k
Jun ’15
Overview of all known innovations of Swift 2.0
This is an overview of all known innovations of Swift 2.0 so far.Recursive nested functionsSwift 1.0 to 2.0 MigratorImproved option setsMarkdown in commentsFaster debug modeObjective-C genericsError handling modelC function pointer APIsAvailability checkingShorter compile timeMutability warningsPattern matching in ifMulti-payload enumsNew playgrounds@testabledo{}Parallelized WMOProtocol extensionsFaster runtimedeferrepeatNullability in Objective-CSynthesized headers in XcodeguardSIMD supportIf you find new features feel free to add them here.
4
0
1k
Jun ’15
Open-Sourcing Plan
My greatest wish for WWDC was that Apple would announce that they're open-sourcing Swift. I tuned into the live stream from, literally, the middle of Yellowstone National Park, where bandwidth is pretty hard to find, just hoping to hear that—and I got my wish. I couldn't be happier.What's a little obscure, though, is the announcement that Apple will be doing a port to Linux. Do you mean that literally, that your release will be Linux-specific, and someone else will have to port it to BSD? Does that further mean Swift won't simply be part of LLVM?When I can use Swift on FreeBSD I'll be very happy, so I'm eager to know the answer to that.
25
0
3.1k
Jun ’15
Why is Swift 2 switching from reStructuredText to Markdown?
I'm sure I'm not alone in thinking that Swift had made an excellent choice in going with reStructuredText for doc comments. I know Markdown is more ubiquitous, but it's also somewhat ill-defined and isn't particularly well-suited to long-form text. The use of reStructuredText promised to have a much more standardized way of writing documentation that could be very expressive and support extensions in a well-defined way (e.g. so documentation tools could define extensions you could use in your code).The only real concrete benefit to using Markdown is unifying it with Playground rich comments, but it seems to me that Playground rich comments should have just been using reStructuredText to begin with (or perhaps could have had a toggle in the document inspector for comment style, if there's a real need to support Markdown here, although I don't know what that need would be).
4
0
1.6k
Jun ’15
Reply to No symbols for paired Apple Watch
Looks like I've solved this simply by disconnecting and reconnecting the phone.EDIT for Beta 2: I'm seeing the same issue as everybody else respodning after 6/24. My phone+watch target is listed as ineleigible for the reason: (no symbols for paired Apple Watch). Unmarking this answer as correct.
Topic: App & System Services SubTopic: Core OS Tags:
Jun ’15
I want to put bordercolor with uiview by swift.
Hi there.I want to put bordercolor with uiview by swift,but i can't do it on iOS7.----------------------------self.layer.borderColor = UIColor.blackColor().CGColorself.layer.borderWidth = 1.0---------------------------This code can be used on iOS8,but it can't be used on iOS7.In iOS7,i imported 'quartzcore' in my code,i couldn't do it.what should i do?Thank you.
Topic: UI Frameworks SubTopic: UIKit Tags:
6
0
4.4k
Jun ’15