Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| @interface NSFileManager (DoNotBackup) | |
| - (BOOL)addSkipBackupAttributeToItemAtURL:(NSURL *)URL; | |
| @end |
| import java.lang.reflect.Type; | |
| import android.util.Base64; | |
| import com.google.gson.Gson; | |
| import com.google.gson.GsonBuilder; | |
| import com.google.gson.JsonDeserializationContext; | |
| import com.google.gson.JsonDeserializer; | |
| import com.google.gson.JsonElement; | |
| import com.google.gson.JsonParseException; |
| + (UIImage*)imageNamedForDevice:(NSString*)name { | |
| if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) | |
| { | |
| if (([UIScreen mainScreen].bounds.size.height * [UIScreen mainScreen].scale) >= 1136.0f) | |
| { | |
| //Check if is there a path extension or not | |
| if (name.pathExtension.length) { | |
| name = [name stringByReplacingOccurrencesOfString: [NSString stringWithFormat:@".%@", name.pathExtension] | |
| withString: [NSString stringWithFormat:@"-568h@2x.%@", name.pathExtension ] ]; |
| #!/bin/bash -e | |
| cd "${1-.}" | |
| for f in *; do | |
| if [[ $f == *@2x* ]]; | |
| then | |
| convert $f -resize 50% ${f//@2x/} | |
| fi | |
| done |
| #!/bin/bash -e | |
| # Ensure we're running in location of script. | |
| cd "`dirname $0`" | |
| for f in *; do | |
| if [[ $f == *@3x* ]]; | |
| then | |
| echo "$f -> ${f//@3x/@2x}, ${f//@3x/}" | |
| convert "$f" -resize 66.66666% "${f//@3x/@2x}" |
| + (NSArray*)allEntriesInContext:(NSManagedObjectContext*)context fromDate:(NSDate*)fromDate toDate:(NSDate*)toDate{ | |
| // Create the request | |
| NSFetchRequest *request = [[NSFetchRequest alloc]initWithEntityName:@"Entry"]; | |
| // Build the predicate | |
| NSPredicate *predicate = [NSPredicate predicateWithFormat: @"date >= %@ && date <= %@ ", fromDate, toDate]; | |
| request.predicate = predicate; | |
| // Define sorting | |
| NSSortDescriptor *sortDesc = [NSSortDescriptor sortDescriptorWithKey:@"date" ascending:YES]; | |
| request.sortDescriptors = @[sortDesc]; |
| # Built application files | |
| /*/build/ | |
| # Crashlytics configuations | |
| com_crashlytics_export_strings.xml | |
| # Local configuration file (sdk path, etc) | |
| local.properties | |
| # Gradle generated files |
| <?xml version="1.0" encoding="utf-8"?> | |
| <resources> | |
| <!-- google's material design colours from | |
| http://www.google.com/design/spec/style/color.html#color-ui-color-palette --> | |
| <!--reds--> | |
| <color name="md_red_50">#FFEBEE</color> | |
| <color name="md_red_100">#FFCDD2</color> | |
| <color name="md_red_200">#EF9A9A</color> |
Recommendations of unit types per media type:
| Media | Recommended | Occasional use | Infrequent use | Not recommended |
|---|---|---|---|---|
| Screen | em, rem, % | px | ch, ex, vw, vh, vmin, vmax | cm, mm, in, pt, pc |
| em, rem, % | cm, mm, in, pt, pc | ch, ex | px, vw, vh, vmin, vmax |
| flex-flow:column-reverse wrap-reverse; | |
| justify-content:center; | |
| align-content:space-between; |