Skip to content

Instantly share code, notes, and snippets.

View de.json
{
"language": "de",
"values" : {
"EDIT_PROFILE_TITLE" : {
"value" : "Profil Bearbeiten",
"comment" : "Text shown as the title of the edit profile view controller."
},
"TEXT_TOO_LONG" : {
"value" : "Dein Text ist zu lang. Bitte kürzen.",
"comment" : "Error message shown in an alert if the text entered into a text field is too long."
@pkluz
pkluz / en.json
Last active Aug 5, 2016
Localization-De
View en.json
{
"language": "en",
"values" : {
"EDIT_PROFILE_TITLE" : {
"value" : "Edit Profile",
"comment" : "Text shown as the title of the edit profile view controller."
},
"TEXT_TOO_LONG" : {
"value" : "Your text is too long. Please shorten it.",
"comment" : "Error message shown in an alert if the text entered into a text field is too long."
View gist:bf4721d2d96db72ce3b0
class CameraView: UIView {
override class func layerClass() -> AnyClass! {
return object_getClass(AVCaptureVideoPreviewLayer())
}
var captureLayer: AVCaptureVideoPreviewLayer {
return layer as AVCaptureVideoPreviewLayer
}
@pkluz
pkluz / gist:3653117
Created Sep 6, 2012
Spinning UIImageView (Custom Activity Indicator)
View gist:3653117
// Depends. Entirely in Interface Builder it's not doable, but what you can do is grab an UIImageView and place it on your view. Style it any way you want by assigning an image to it. Then in code you do this (i.e. in you viewDidLoad of the controller (or later, if you want it re-used, in its own subclass)):
- (void)viewDidLoad
{
[super viewDidLoad];
// Create an animation that rotates something around its Z axis.
CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"transform.rotation.z"];
// M_PI_2 = 360 degree rotation.
@pkluz
pkluz / gist:2400661
Created Apr 16, 2012
ZUUIRevealController - Entire front view interaction....
View gist:2400661
@interface FrontViewController()
@property (nonatomic, retain) UIPanGestureRecognizer *panGestureRecognizer;
@end
@implementation
@synthesize panGestureRecognizer = _panGestureRecognizer;