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
extension ReusableCell where Self: UICollectionViewCell { | |
static func uiNibFromClass() -> UINib? { | |
return UINib(nibName: Self.className, bundle: nil) | |
} | |
static func reuseIdentifier() -> String? { | |
return Self.className | |
} | |
} |
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
protocol ReusableCell: AnyObject { | |
static func reuseIdentifier() -> String? | |
static func uiNibFromClass() -> UINib? | |
} |
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
static NSString *encodeText(NSString *string, int key) | |
{ | |
NSMutableString *result = [[NSMutableString alloc] init]; | |
for (int i = 0; i < [string length]; i++) | |
{ | |
unichar c = [string characterAtIndex:i]; | |
c += key; | |
[result appendString:[NSString stringWithCharacters:&c length:1]]; | |
} | |
return result; |
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 android.content.Context; | |
import android.content.SharedPreferences; | |
import android.os.AsyncTask; | |
import android.support.annotation.Nullable; | |
import android.util.Log; | |
import android.util.Pair; | |
import com.google.android.gms.common.ConnectionResult; | |
import com.google.android.gms.common.GooglePlayServicesUtil; | |
import com.google.android.gms.gcm.GoogleCloudMessaging; |
NewerOlder