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
public enum FilterType: String, BaseSelectionType, CaseIterable { | |
case colorDocument = "colorDocumentLocalization" | |
case blackAndWhite = "blackAndWhiteLocalization" | |
case colorPhoto = "colorPhotoLocalization" | |
case greyscale = "greyscaleLocalization" | |
case general = "generalLocalization" | |
func localizedString() -> String { | |
return NSLocalizedString(self.rawValue, comment: "") | |
} |
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
public enum FilterType: String, BaseSelectionType, CaseIterable { | |
case colorDocument = "Color Document" | |
case blackAndWhite = "Black And White" | |
case colorPhoto = "Color Photo" | |
case greyscale = "Greyscale" | |
} | |
// getting the raw value | |
FilterType.allCases.map({ (type) -> String in | |
print type.rawValue |
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
public enum FilterType: String, BaseSelectionType, CaseIterable { | |
case colorDocument | |
case blackAndWhite | |
case colorPhoto | |
case greyscale | |
var getDisplayText: String { | |
switch self { | |
case .colorDocument: | |
return Localizable.filterColorDocument |
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
enum InfoEndpointItem: Endpoint { | |
case sendInfo(request: [String: Any]) | |
case getInfo(perPage: Int) | |
var path: String { | |
switch self { | |
case .sendInfo: | |
return "sendInfo" | |
case .getInfo(let perPage): |
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
public enum FilterType: String, BaseSelectionType { | |
case colorDocument | |
case blackAndWhite | |
case colorPhoto | |
case greyscale | |
func getDisplayText(endingText: String) -> String { | |
switch self { | |
case .colorDocument: | |
return Localizable.filterColorDocument + endingText |
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
public enum FilterType: String, BaseSelectionType { | |
case colorDocument | |
case blackAndWhite | |
case colorPhoto | |
case greyscale | |
var getDisplayText: String { | |
switch self { | |
case .colorDocument: | |
return Localizable.filterColorDocument |
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
public enum SelectionType { | |
case filter | |
case size | |
} | |
public protocol BaseSelectionType { | |
var selectionType: SelectionType { get } | |
} | |
public enum FilterType: String, BaseSelectionType { |
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
exec > /tmp/${PROJECT_NAME}_archive.log 2>&1 | |
UNIVERSAL_OUTPUTFOLDER=${BUILD_DIR}/${CONFIGURATION}-universal | |
if [ "true" == ${ALREADYINVOKED:-false} ] | |
then | |
echo "RECURSION: Detected, stopping" | |
else | |
export ALREADYINVOKED="true" |
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
set -e | |
set +u | |
# Avoid recursively calling this script. | |
if [[ $SF_MASTER_SCRIPT_RUNNING ]] | |
then | |
exit 0 | |
fi | |
set -u | |
export SF_MASTER_SCRIPT_RUNNING=1 |
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 <UIKit/UIKit.h> | |
@interface UIAlertController (Orientation) | |
@end |