- components/accordion.json
component.accordion.border-width.focused
component.accordion.border-width.icon.outlined
component.accordion.color.background.hover
component.accordion.color.background.pressed
component.accordion.color.border.focused
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
+(NSString*)sanitizeString:(NSString *)originalString | |
{ | |
// example string | |
// NSString *unfilteredString = @"!@#$%^&*()_+|abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; | |
// define the characters you want to allow | |
NSString *allowedChars =@"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890"; | |
// makes an inverted set based on your setting | |
NSCharacterSet *notAllowedChars = [[NSCharacterSet characterSetWithCharactersInString:allowedChars] invertedSet]; |
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
-(void)makeCountriesJSON | |
{ | |
NSArray<NSString*> *localeIds = @[@"pt", @"en"]; | |
NSArray<NSString*> *countryCodesArray = [NSLocale ISOCountryCodes]; | |
NSMutableString *json = [NSMutableString stringWithString:@"{"]; | |
[localeIds enumerateObjectsUsingBlock:^(NSString * localeId, NSUInteger localeIndex, BOOL * _Nonnull stop) { | |
NSLocale *locale = [NSLocale localeWithLocaleIdentifier:localeId]; |
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
#!/usr/bin/env bash | |
rm -rf "${HOME}/Library/Caches/CocoaPods" | |
rm -rf "`pwd`/Pods/" | |
pod update |
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
// get off main thread and execute costly code | |
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0), ^{ | |
// jump back to main thread and update your UI | |
dispatch_async(dispatch_get_main_queue(), ^{ | |
}); | |
}); |
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
#!/bin/bash | |
PROCESS=Contents/MacOS/Xcode | |
WORKSPACE={Your Workspace/Project Path} | |
CACHE=~/Library/Developer/Xcode/DerivedData | |
# -------- | |
previousHead=$1 | |
currentHead=$2 |
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 | |
// MARK: - UIKit.UIView -> SwiftUI.View | |
public extension NSObjectProtocol where Self: UIView { | |
/// Creates a wrapper for a UIKit view that you use to integrate that view into your | |
/// SwiftUI view hierarchy. | |
/// | |
/// For best results set sensible values for [content compression resistance](https://developer.apple.com/documentation/uikit/uiview/1622526-setcontentcompressionresistancep), | |
/// and [content hugging priority](https://developer.apple.com/documentation/uikit/uiview/1622485-setcontenthuggingpriority) in your content view and it's immediate subviews. |
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
alias: Luz Sala Jantar | |
description: "" | |
trigger: | |
- type: motion | |
platform: device | |
device_id: 0f52625e2f8107945c7039224cd45b8c | |
entity_id: ba6fd12b9550964f2645da6481182867 | |
domain: binary_sensor | |
id: motion_on | |
for: |
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 | |
import Combine | |
typealias BindableObservableObject<T> = T where T: ObservableObject, T.ObjectWillChangePublisher == ObservableObjectPublisher | |
/// A type that exposes its writable properties as bindings. | |
extension ObservableObject where Self == BindableObservableObject<Self> { | |
/// A type that acts as a lens that exposes bindings to the | |
/// writable properties of this type. | |
typealias Bindings = ExposedBindings<Self> |