Skip to content

Instantly share code, notes, and snippets.

@setoh2000
setoh2000 / UIView+visible.h
Created November 15, 2012 20:43
UIViewのhiddenの代わりにvisibleを使いたい人へ
#import <UIKit/UIKit.h>
@interface UIView (visible)
- (void)setVisible:(BOOL)flag;
- (BOOL)visible;
@end
@setoh2000
setoh2000 / MSOrderdDictionary.h
Created April 10, 2013 18:03
順序を保存するNSMutableDictionary NSMutableDictionaryなどを継承するのが結構大変なのでNSMutableDictionaryとキーを保持するNSMutableArrayを内包したものを自作。 自分が使うメンバーしか実装していない。
#import <Foundation/Foundation.h>
@interface MSOrderdDictionary : NSObject <NSCoding>
{
NSMutableDictionary *dictionary;
NSMutableArray *array;
}
+ (id)dictionary;
@setoh2000
setoh2000 / gist:7535335
Created November 18, 2013 21:10
iOS7でステータスバーの文字色を白にしてもカメラロールとかにアクセスすると黒に戻ってしまうのを防ぐ方法
- (void)navigationController:(UINavigationController *)navigationController willShowViewController:(UIViewController *)viewController animated:(BOOL)animated
{
[[UIApplication sharedApplication] setStatusBarStyle:UIStatusBarStyleLightContent];
}
@setoh2000
setoh2000 / gist:c8b62654c6e9dccc9c43
Last active August 29, 2015 14:19
Autolayoutでキーボードの高さによってViewを調整する方法(Objective-C版)
// ↓ここで紹介されていたSwiftのコードをObjective-Cに置き換えたものです。
//
// Autolayoutでキーボードの高さによってViewを調整する方法
// http://blog.tsumikiinc.com/article/20150123_autolayout-view.html
//
// StoryboardでUITextViewのBottomのVertical Space ConstraintとbottomLayoutConstraintを接続する必要があります。
// 詳細は元のBlog記事を参照ください。
@property (nonatomic, weak) IBOutlet NSLayoutConstraint *bottomLayoutConstraint;