KWMSearchBar.h 1.46 KB
Newer Older
houweibin committed
1 2 3 4 5 6 7 8 9 10 11 12
//
//  KWMSearchBar.h
//  iCemarose
//
//  Created by HouWeiBin on 16/8/24.
//  Copyright © 2016年 kollway. All rights reserved.
//

#import <UIKit/UIKit.h>


@protocol KWMSearchBarDelegate <NSObject>
lee committed
13
@optional
houweibin committed
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 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60
- (void)kwm_startSearch;
- (void)kwm_onClickSearch:(NSString *)content;
- (void)kwm_onClickShopCar;
- (void)kwm_onCancel;
- (void)kwm_tfSearchBeginEditing;
- (void)kwm_tfSearchFinished:(NSString *)text;
@end
@interface KWMSearchBar : UIView<UITextFieldDelegate>

@property(nonatomic,weak) IBOutlet NSLayoutConstraint *logMarginLeft;

@property(nonatomic,weak) IBOutlet NSLayoutConstraint *searchToLog;

@property(nonatomic,weak) IBOutlet NSLayoutConstraint *textFieldWidth;

@property(nonatomic,weak) IBOutlet UIView *vView;

@property (nonatomic, weak) IBOutlet UIView *vContent;

@property (nonatomic, weak) IBOutlet UIView *vCancel;

@property (nonatomic, weak) IBOutlet UIView *vShopCar;

@property (nonatomic, weak) IBOutlet UITextField *tfSearch;

@property (weak, nonatomic) IBOutlet UIView *vCount;

@property (weak, nonatomic) IBOutlet UILabel *lbCount;

@property (weak, nonatomic) IBOutlet UIButton *btnSearch;

@property (nonatomic) NSInteger count;

@property (nonatomic) BOOL isSearching;

-(IBAction)onClickStartSearch:(id)sender;

-(IBAction)onClickCancel:(id)sender;

-(IBAction)onClickShopCar:(id)sender;

@property(nonatomic,weak) id<KWMSearchBarDelegate> delegate;


- (void)resumeView;//恢复初始布局
- (void)stopSearch;//点击背景停止搜索
@end