-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSGFocusImageFrame.h
More file actions
38 lines (27 loc) · 1.3 KB
/
SGFocusImageFrame.h
File metadata and controls
38 lines (27 loc) · 1.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//
// SGFocusImageFrame.h
// SGFocusImageFrame
//
// Created by Shane Gao on 17/6/12.
// Copyright (c) 2012 Shane Gao. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface SGFocusImageItem : NSObject
@property (nonatomic, strong) NSString *title;
@property (nonatomic, strong) NSString *image;
@property (nonatomic, assign) NSInteger tag;
- (id)initWithTitle:(NSString *)title image:(NSString *)image tag:(NSInteger)tag;
+ (id)itemWithTitle:(NSString *)title image:(NSString *)image tag:(NSInteger)tag;
@end
#pragma mark - SGFocusImageFrameDelegate
@class SGFocusImageFrame;
@protocol SGFocusImageFrameDelegate <NSObject>
- (void)foucusImageFrame:(SGFocusImageFrame *)imageFrame didSelectItem:(SGFocusImageItem *)item;
@end
@interface SGFocusImageFrame : UIView <UIGestureRecognizerDelegate, UIScrollViewDelegate>
- (id)initWithFrame:(CGRect)frame delegate:(id<SGFocusImageFrameDelegate>)delegate focusImageItems:(SGFocusImageItem *)items, ... NS_REQUIRES_NIL_TERMINATION;
- (id)initWithFrame:(CGRect)frame delegate:(id<SGFocusImageFrameDelegate>)delegate focusImageItemsArrray:(NSArray *)items;
@property (nonatomic, assign) BOOL autoScrolling;
@property (nonatomic) NSTimeInterval switchTimeInterval; // default for 10.0s
@property (nonatomic, assign) id<SGFocusImageFrameDelegate> delegate;
@end