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 Stanley | |
| /** | |
| `ReadWriteLock` provides that allow concurrently reading from and synchrously writing to another data structure. | |
| */ | |
| class ReadWriteLock { | |
| /** | |
| Internal queue where read/write operations are dispatched to. | |
| */ | |
| private let queue = DispatchQueue(label: "\(Bundle.main.kst_bundleIdentifier()).read-write-lock", qos: .unspecified, attributes: .concurrent, autoreleaseFrequency: .inherit, target: nil) | 
  
    
      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
    
  
  
    
  | /** | |
| `Atomic` is a property wrapper that enforce atomic read/write access to its wrapped value. | |
| */ | |
| @propertyWrapper | |
| struct Atomic<Value> { | |
| var wrappedValue: Value { | |
| get { | |
| return self.queue.sync { | |
| self.value | |
| } | 
  
    
      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
    
  
  
    
  | <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item android:start="6dp"> | |
| <shape | |
| android:shape="rectangle" | |
| android:tint="#ffca3f"> | |
| <size android:height="175dp" /> | |
| <solid android:color="#ffca3f" /> | |
| </shape> | |
| </item> | 
  
    
      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
    
  
  
    
  | <?xml version="1.0" encoding="utf-8"?> | |
| <layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item | |
| android:id="@android:id/background" | |
| android:gravity="center_vertical|fill_horizontal"> | |
| <shape | |
| android:shape="rectangle" | |
| android:tint="#ffffff"> | |
| <size | |
| android:width="10dp" | 
  
    
      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
    
  
  
    
  | <?xml version="1.0" encoding="utf-8"?> | |
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | |
| <item> | |
| <shape> | |
| <gradient android:angle="270" | |
| android:startColor="#ffeb92" | |
| android:endColor="#ffca3f" | |
| android:type="linear"/> | |
| </shape> | |
| </item> | 
  
    
      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
    
  
  
    
  | <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| tools:context=".MainActivity"> | |
| <RelativeLayout | |
| android:layout_width="match_parent" | 
  
    
      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)setupSearchBarAppearance { | |
| [UISearchBar.appearance setBarTintColor:UIColor.TMO_subviewBackgroundColor]; | |
| [UISearchBar.appearance setSearchFieldBackgroundImage:({ | |
| CGSize size = CGSizeMake(TMOCornerRadius + TMOCornerRadius + 1, 32); | |
| UIGraphicsBeginImageContext(size); | |
| [UIColor.TMO_viewBackgroundColor setFill]; | |
| [[UIBezierPath bezierPathWithRoundedRect:CGRectMake(0, 0, size.width, size.height) cornerRadius:TMOCornerRadius] fill]; | |
| UIImage *retval = [UIGraphicsGetImageFromCurrentImageContext() resizableImageWithCapInsets:UIEdgeInsetsMake(0, TMOCornerRadius, 0, TMOCornerRadius) resizingMode:UIImageResizingModeTile]; | 
  
    
      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
    
  
  
    
  | // | |
| // WorkoutDetailSectionHeaderView.swift | |
| // tribal-ios | |
| // | |
| // Created by William Towe on 11/6/18. | |
| // Copyright © 2018 Kosoku Interactive, LLC. 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
    
  
  
    
  | #import "iOS11PrivateClass.h" | |
| #import "iOS10PrivateClass.h" | |
| #import <Availability.h> | |
| @implementation MyClass | |
| - (instancetype)init { | |
| if (self.class == MyClass.class) { | |
| #if __IPHONE_11_0 | |
| return [[iOS11PrivateClass alloc] init]; | 
  
    
      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)logToFile { | |
| NSURL *directoryURL = [[NSFileManager defaultManager] URLsForDirectory:NSDocumentDirectory inDomains:NSUserDomainMask].firstObject; | |
| directoryURL = [directoryURL URLByAppendingPathComponent:@"XfinityDebugLogs" isDirectory:YES]; | |
| if (![directoryURL checkResourceIsReachableAndReturnError:NULL]) { | |
| [[NSFileManager defaultManager] createDirectoryAtURL:directoryURL withIntermediateDirectories:YES attributes:nil error:NULL]; | |
| [directoryURL setResourceValue:@YES forKey:NSURLIsExcludedFromBackupKey error:NULL]; | |
| } | 
NewerOlder