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 <Foundation/Foundation.h> | |
typedef void(^HTTPLoaderCompleteBlock)(NSData *data, NSError *error); | |
@interface HTTPLoader : NSObject | |
+(void)loadAsync:(NSURLRequest *)request complete:(HTTPLoaderCompleteBlock)completion; | |
@end |
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
// | |
// CustomAlertView.h | |
// CustomAlert | |
// | |
// Created by masaki.fuke on 2012/08/23. | |
// Copyright (c) 2012年 masaki.fuke. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UIImage+Blur.h | |
// HTTPLoaderTest | |
// | |
// Created by masaki.fuke on 12/08/14. | |
// Copyright (c) 2012年 masaki.fuke. All rights reserved. | |
// | |
#import <UIKit/UIKit.h> |
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 <Foundation/Foundation.h> | |
@interface ActivityText : NSObject <UIActivityItemSource> | |
-(id)initWithText:(NSString *)text hashTag:(NSString *)hashTag; | |
@end |
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
-(void)openActivityController | |
{ | |
NSString *text = @"本文はこちらです。 #ハッシュタグ"; | |
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:@[text] applicationActivities:nil]; | |
[self presentViewController:avc animated:YES completion:nil]; | |
} |
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
- (IBAction)share:(id)sender | |
{ | |
ActivityText *text = [[ActivityText alloc] initWithText:@"本文はこちらです。" hashTag:@"ハッシュタグ"]; | |
UIActivityViewController *avc = [[UIActivityViewController alloc] initWithActivityItems:@[text] applicationActivities:nil]; | |
[self presentViewController:avc animated:YES completion:nil]; | |
} |
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
typedef id (^ActivitySourceWrapperExecuteBlock)(UIActivityViewController* activityViewController,NSString* activityType); | |
@interface ActivitySourceWrapper : NSObject<UIActivityItemSource> | |
@property id placeholder; | |
-(id)initWithBlock:(ActivitySourceWrapperExecuteBlock)block; | |
-(id)initWithBlock:(ActivitySourceWrapperExecuteBlock)block withPlaceholder:(id)placeholder; | |
@end |
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 <UIKit/UIKit.h> | |
@interface UITableViewCell (IndexPath) | |
-(UITableView *)tableView; | |
-(NSIndexPath *)indexPath; | |
@end |
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 <UIKit/UIKit.h> | |
// delegate method定義 | |
@protocol UITableViewDelegateSwitchCell <UITableViewDelegate> | |
@optional | |
-(void)tableView:(UITableView *)tableView didChangeValue:(BOOL)value forRowWithIndexPath:(NSIndexPath *)indexPath; | |
@end | |
@interface SwitchCell : UITableViewCell |
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 "ViewController.h" | |
#import "SwitchCell.h" | |
@interface ViewController () <UITableViewDataSource, UITableViewDelegateSwitchCell> | |
@end | |
@implementation ViewController | |
- (void)viewDidLoad |
OlderNewer