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 SwiftUI | |
struct ContentView: View { | |
var body: some View { | |
ScrollView { | |
VStack(spacing: 0) { | |
Group { | |
Color.red | |
Color.yellow | |
} |
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 SwiftUI | |
import UIKit | |
private struct BodyCounterView: UIViewRepresentable { | |
let color: UIColor | |
private let id = UUID() // Force view updates | |
func makeUIView(context: Context) -> _BodyCounterView { | |
let view = _BodyCounterView() |
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
@objc protocol ExampleActions: AnyObject { | |
func pushUIKitViewController() | |
} | |
struct ExampleView: View { | |
@FirstResponder private var firstResponder | |
var body: some View { | |
Button { | |
firstResponder.sendAction(#selector(ExampleActions.pushUIKitViewController)) |
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
@implementation UILabel (SwizzlingExamples) | |
+ (void)load | |
{ | |
SwizzleSelectorWithBlock_Begin(self, @selector(initWithFrame:)) | |
^(UILabel *self, CGRect frame) { | |
if ((self = ((id (*)(id, SEL, CGRect))_imp)(self, _cmd, frame))) { | |
// ... | |
} | |
return self; |
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
#!/bin/sh | |
# Repository settings | |
REPOSITORY_NAME="YourRepositoryName" | |
README_FILE_NAME="README.markdown" | |
# Update a Travis badge URL found in the README to keep it in sync with the branch name | |
# Badge example: | |
# [![Build Status](https://img.shields.io/travis/$USER_NAME/$REPOSITORY_NAME/master.svg?style=flat)](https://travis-ci.org/$USER_NAME/$REPOSITORY_NAME) | |
branch_name=`git symbolic-ref --short HEAD` |
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
// | |
// UITextView+SDECursorVisibility.m | |
// | |
// Created by Samuel Défago on 29.10.14. | |
// | |
#import <UIKit/UIKit.h> | |
@interface UITextView (SDECursorVisibility) |
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
# | |
# Uncrustify Configuration File | |
# File Created With UncrustifyX 0.4.3 (252) | |
# | |
# Alignment | |
# --------- | |
## Alignment |