Skip to content

Instantly share code, notes, and snippets.

@123nobody
123nobody / UISegmentedControl+Flat.h
Created April 14, 2014 09:00
Set UISegmentedControl to iOS 7 style.
//
// UISegmentedControl+Flat.h
//
// Created by 魏哲 on 14-2-28.
//
#import <UIKit/UIKit.h>
@interface UISegmentedControl (Flat)
@123nobody
123nobody / UIButton+Extensions.h
Created April 10, 2014 06:25
Making UIButton's hit area larger than the default hit area
@interface UIButton (Extensions)
@property(nonatomic, assign) UIEdgeInsets hitTestEdgeInsets;
@end
- (void)keyboardWillShow:(NSNotification *)notification
{
[UIView beginAnimations:nil context:NULL];
[UIView setAnimationDuration:[notification.userInfo[UIKeyboardAnimationDurationUserInfoKey] doubleValue]];
[UIView setAnimationCurve:[notification.userInfo[UIKeyboardAnimationCurveUserInfoKey] integerValue]];
[UIView setAnimationBeginsFromCurrentState:YES];
// do something
[UIView commitAnimations];
#import <Foundation/Foundation.h>
@interface Invoker : NSObject
+ ( NSValue * ) invoke:( SEL ) selector onTarget:( id ) target, ...;
@end
//
// UIView+DEFrameAdditions.h
//
// Copyright (c) 2011-2013 Double Encore, Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
// Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
// Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the distribution. Neither the name of the Double Encore Inc. nor the names of its
// contributors may be used to endorse or promote products derived from this software without specific prior written permission.