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/UIKit.h> | |
IB_DESIGNABLE | |
@interface CircleImageVIew : UIView | |
@property (assign) IBInspectable BOOL showFrame; | |
@property (nonatomic, strong) IBInspectable UIImage *image; | |
@property (nonatomic, strong) IBInspectable UIColor *borderColor; | |
@property (nonatomic, strong) IBInspectable UIColor *borderStrokeColor; |
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
// | |
// MapClusterPinView.h | |
// | |
// Created by Rob Booth on 10/9/15. | |
// Copyright © 2015 Rob Booth. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> | |
@interface MapClusterPinView : UIView |
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
// | |
// ViewController.m | |
// countdown | |
#import "ViewController.h" | |
@interface ViewController () | |
@property (strong, nonatomic) IBOutlet UIView *container; | |
@property (strong, nonatomic) IBOutlet UILabel *label1; |
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
#!/usr/bin/env python | |
# Easy Combine output movies | |
# ls -tr himawari8_*.mp4 | perl -ne 'print "file $_"' | ffmpeg -f concat -i - -c copy FullMovie.mp4 | |
# Requirements | |
# brew install libtiff libjpeg webp little-cms2 ffmpeg | |
# pip install Pillow | |
import datetime |
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 | |
public extension UIFont { | |
class func loadAllFonts(bundleIdentifierString: String) { | |
registerFontWithFilenameString(filenameString: "icon-font.ttf", bundleIdentifierString: bundleIdentifierString) | |
// Add more font files here as required | |
} | |
static func registerFontWithFilenameString(filenameString: String, bundleIdentifierString: String) { |
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 PlaygroundSupport | |
import SwiftUI | |
// Requires 2 images author.jpg and header.jpg in the Resources folder to work | |
struct ContentView: View { | |
var body: some View { | |
ScrollView { | |
ParallaxView() |
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
final class SingleItemCarouselFlowLayout: UICollectionViewFlowLayout { | |
override func targetContentOffset(forProposedContentOffset proposedContentOffset: CGPoint, withScrollingVelocity velocity: CGPoint) -> CGPoint { | |
guard let collectionView = collectionView else { | |
return super.targetContentOffset(forProposedContentOffset: proposedContentOffset, withScrollingVelocity: velocity) | |
} | |
var offsetAdjustment: CGFloat = .greatestFiniteMagnitude |
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 | |
/// Struct identifying a Feature Flag that is used to enable/disable access to a feature | |
/// | |
/// example: | |
/// ``` | |
/// // Only allow this feature on iPhones in the US if the flag is enabled | |
/// let featureFlag = FeatureFlag(name: "EnableMyFeature", localeRestrictions: ["en_US"], deviceTypes: [.phone]) | |
/// guard featureFlag.isEnabled else { return } | |
/// ``` |
OlderNewer