Post

Replies

Boosts

Views

Activity

Reply to How to add another playground page
I'm not sure what problem you're facing, but based on your description, I'm guessing that this situation is caused by forgetting to change the contents of the Manifest.plist file? The Manifest.plist file should be under the Chapter folder and you need to change the 'Pages' array property in it to correspond to multiple playground pages. 🦁️🦁️🦁️🦁️🦁️
Apr ’21
Reply to UIView Animation won't Loop
Hi! You may have misunderstood how 'UIView.animate' works. When you execute 'UIView.animate' with loops, the program will not wait until the end of the animation before executing the next loop, So you're actually executing four animations at the same time. That's why you can only see the last animation. You need to start executing the next animation after the previous one has finished. The following code should solve your problem, but note that it is not necessarily the best solution. It's for helping you understand how it works. swift let data = [1, 2, 3, 4] var i = 0 func doAnimations() {   UIView.animate(withDuration: 1) {     // make animations here     // eg: view.frame.origin = CGPoint(x: data[i], y: data[i])   } completion: { (isFinished) in     i += 1     if i = data.count { return }     doAnimations()   } } 🦁️🦁️🦁️🦁️🦁️ Hope this helps you!
Topic: UI Frameworks SubTopic: UIKit Tags:
Apr ’21
Reply to How do I set up Playgrounds program in IPAD
Hi! Swift Student Challenge accept Xcode playground file and playgroundbook at the same time. If you just want to participate in this challenge, you can choose to make a Xcode playground.(XcodeFileNewPlayground... But If you want your program to run on the iPad(on 'Swift Playground' app), You may need an author template for playgroundbook. You can find more details here. - https://developer.apple.com/documentation/swift_playgrounds/creating_and_running_a_playground_book By coding in that template, you can get the file with 'playgroundbook' extension. Then you just need to airdrop that file to your iPad, at least these steps works for me.😄 🦁️🦁️🦁️🦁️🦁️
Apr ’21
Reply to College Documents for the Challenge
You have to get a proof of enrollment(在校证明) with the contact information for your educational supervisor(可以是校长、辅导员或类似职位人员)。 I haven't tried uploading a class schedule so I can't offer any experience in that area. And please note that the proof of enrollment needs to be bilingual! 🦁️🦁️🦁️🦁️🦁️ Hope this helps you!
Topic: Programming Languages SubTopic: Swift Tags:
Apr ’21
Reply to 请求swift和swift playground
如果是要参加 Swift Student Challenge 的话你可以选择新建一个 playground,Xcode project 在规则上不会被接受。 除了 playground 之外,playgroundbook 也是可以被接受的。 提交文件等事宜可以查看该网站 - https://developer.apple.com/wwdc21/swift-student-challenge/ 另外个人认为用英语交流更好😉。 If you are participating in the Swift Student Challenge, playground file will be fine. (Xcode projects will not be accepted in the rules. In addition to playground files, playgroundbook files can also be accepted. See this site for submission and other things - https://developer.apple.com/wwdc21/swift-student-challenge/ And i think it is better to communicate in English.😉 🦁️🦁️🦁️🦁️🦁️ Hope this will help you!
Mar ’21
Reply to Swift Playgrounds importing CoreML Model
Instead of adding a mlmodel file directly, you may need a compiled file with ".mlmodelc" to make it work. You can find more infomation here. - https://developer.apple.com/documentation/coreml/mlmodel/2921516-compilemodel I tried to run my ML model code in a Xcode project, and i got a compiled file with ".mlmodelc" extension. Bring this ".mlmodelc" file to my playgroundbook file works fine! 🦁️🦁️🦁️🦁️🦁️ Hope this will help you!
Mar ’21