This file contains 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
extension View { | |
func fittingSheet<Content: View>( | |
isPresented: Binding<Bool>, | |
backgroundColor: Color? = nil, | |
additionalDetents: Set<PresentationDetent> = [], | |
shouldShowDragIndicator: Bool = true, | |
onDismiss: (() -> Void)? = nil, | |
content: @escaping () -> Content | |
) -> some View { |
This file contains 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 SimpleStackView: UIView { | |
var padding:CGFloat = 0 { | |
didSet { | |
setNeedsLayout() | |
} | |
} | |
var spacing:CGFloat = 0 { | |
didSet { |
This file contains 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 UIKit | |
import MessageUI | |
class SimpleSectionsViewController: UITableViewController { | |
enum UserInfoRow { | |
case name | |
} | |
enum ContactInfoRow { | |
case email |
This file contains 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
/* | |
Put that Line of code somewhere before you initialize the javascript application | |
You can read a Blogpost about that topic here: | |
https://medium.com/shopgate-mobile-commerce/hacking-tvml-4387e65a9b94#.o2onhfgo4 | |
*/ | |
[TVInterfaceFactory sharedInterfaceFactory].extendedInterfaceCreator = [CustomInterfaceCreator new]; |