WWDC 2006 2007 2008 2009 2010 2011 2012 2013 2014
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
/// View model protocol | |
protocol ViewModel: ObservableObject { | |
var count: Int { get } | |
func increase() | |
} | |
/// Concrete implementation | |
class MyViewModel: ViewModel { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// Picker.swift | |
// Crypic | |
// | |
// Created by Takeshi Tanaka on 2020/05/16. | |
// Copyright © 2020 p0dee. All rights reserved. | |
// | |
import SwiftUI |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import SwiftUI | |
struct ContentView : View { | |
var body: some View { | |
ZStack(alignment: Alignment.top) { | |
MapView() | |
SlideOverCard { | |
VStack { | |
CoverImage(imageName: "maitlandbay") | |
Text("Maitland Bay") |
This notes is written by Sheldon. You can find me with #iOSBySheldon in Github, Youtube, Facebook, etc.
Convert .mov/.MP4 to .gif
As a developer, I feel better to upload a short video when I create the pull request to show other viewers what I did in this PR. I tried .mov format directly got after finishing recording screen using Quicktime, however, gif offers preview in most web pages, and has smaller file size.
This is not limited to developer, anyone has this need can use this method to convert the files.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
See LICENSE folder for this sample’s licensing information. | |
Abstract: | |
The `MusicPlayerManager` manages the media playback using the `MPMusicPlayerController` APIs. | |
*/ | |
import UIKit | |
import MediaPlayer |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
// ViewController.swift | |
// Repnote | |
// | |
// Created by John Neumann on 05/07/2017. | |
// Copyright © 2017 Audioy. All rights reserved. | |
// | |
import UIKit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MulticastDelegate <T> { | |
private let delegates: NSHashTable<AnyObject> = NSHashTable.weakObjects() | |
func add(delegate: T) { | |
delegates.add(delegate as AnyObject) | |
} | |
func remove(delegate: T) { | |
for oneDelegate in delegates.allObjects.reversed() { | |
if oneDelegate === delegate as AnyObject { |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder