From 61c32c9494b046bb3a762171368e0907394a3824 Mon Sep 17 00:00:00 2001 From: xujiaqi Date: Tue, 28 Jul 2015 15:48:25 +0800 Subject: [PATCH 1/2] add code snippet --- ...6C-7DD9-43C5-B83F-C4E54F542F64.codesnippet | 38 ++++++++++ ...33-5D65-4101-9C7C-A43509BB57B8.codesnippet | 2 +- ...E5-13E0-4B11-9BE3-4EEEB93DB277.codesnippet | 6 +- ...F8-AAEA-4B6F-B9B4-666436184FB0.codesnippet | 26 +++++++ ...A0-788A-4831-B211-BECF59282544.codesnippet | 44 +++++++++++ ...5E-44FA-491F-8E4B-3251A46D5372.codesnippet | 6 +- ...76-9BBC-4442-86F2-37DB97C7AC37.codesnippet | 6 +- ...81-F73D-44B3-953E-87BC6388831F.codesnippet | 27 +++++++ ...2A-C6CF-4774-8A7D-EA6BEE058C11.codesnippet | 6 +- ...91-678A-4727-9EBA-6F9D327EF485.codesnippet | 6 +- ...E7-69E7-46E6-B4F0-F3C5EEC1BC12.codesnippet | 6 +- ...53-BDF5-48C3-8B7F-08EB04D69442.codesnippet | 6 +- ...5A-F6BD-412C-AA06-DC931E43F730.codesnippet | 2 +- ...CD-E79A-464F-B849-29BEB3CF4B01.codesnippet | 4 +- ...87-4757-4E8E-A8A2-1299CE7B5420.codesnippet | 38 +++++----- ...5F-F3D6-4479-A2DF-0C8B21740CD6.codesnippet | 21 ++++-- ...20-EE5A-44F5-B35D-854A96E88F2D.codesnippet | 6 +- ...F7-EF10-4F82-A9D3-D0E9C0991E9E.codesnippet | 6 +- ...1D-F3C0-4ACE-B762-311643CF473D.codesnippet | 26 +++++++ ...FF-00F3-4E84-8645-E57FF6E4A005.codesnippet | 34 +++++++++ ...E2-7433-4892-9314-95759F276395.codesnippet | 2 +- ...52-0F4C-41C6-B676-D743164F64E9.codesnippet | 74 +++++++++++++++++++ 22 files changed, 336 insertions(+), 56 deletions(-) create mode 100644 CodeSnippets/167C436C-7DD9-43C5-B83F-C4E54F542F64.codesnippet create mode 100644 CodeSnippets/40915EF8-AAEA-4B6F-B9B4-666436184FB0.codesnippet create mode 100644 CodeSnippets/440EA5A0-788A-4831-B211-BECF59282544.codesnippet create mode 100644 CodeSnippets/5C97A281-F73D-44B3-953E-87BC6388831F.codesnippet create mode 100644 CodeSnippets/C73C891D-F3C0-4ACE-B762-311643CF473D.codesnippet create mode 100644 CodeSnippets/DA94C6FF-00F3-4E84-8645-E57FF6E4A005.codesnippet create mode 100644 CodeSnippets/E6F58A52-0F4C-41C6-B676-D743164F64E9.codesnippet diff --git a/CodeSnippets/167C436C-7DD9-43C5-B83F-C4E54F542F64.codesnippet b/CodeSnippets/167C436C-7DD9-43C5-B83F-C4E54F542F64.codesnippet new file mode 100644 index 00000000..ec11f38b --- /dev/null +++ b/CodeSnippets/167C436C-7DD9-43C5-B83F-C4E54F542F64.codesnippet @@ -0,0 +1,38 @@ + + + + + IDECodeSnippetCompletionPrefix + jackie_post_请求网络 + IDECodeSnippetCompletionScopes + + ClassImplementation + + IDECodeSnippetContents + + (MKNetworkOperation *)<#api_name#> success:(void (^)(StatusModel *))success +{ + NSMutableDictionary *params = [NSMutableDictionary dictionaryWithCapacity:0]; + [params setValue:userId? @"" : @"0" forKey:@"userId"]; + [params setValue:<#value#> forKey:<#key#>]; + + return [self postDataResponsePath:<#path#> params:params isBackground:YES onCompletion:^(id data) { + StatusModel *model = [self statusModelFromJSONObject:data]; + if (success) + { + success(model); + } + }]; +} + + IDECodeSnippetIdentifier + 167C436C-7DD9-43C5-B83F-C4E54F542F64 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetTitle + request api + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/1C071233-5D65-4101-9C7C-A43509BB57B8.codesnippet b/CodeSnippets/1C071233-5D65-4101-9C7C-A43509BB57B8.codesnippet index d50feb6c..c30535bd 100644 --- a/CodeSnippets/1C071233-5D65-4101-9C7C-A43509BB57B8.codesnippet +++ b/CodeSnippets/1C071233-5D65-4101-9C7C-A43509BB57B8.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_custom_dispatch + jackie_custom_dispatch IDECodeSnippetCompletionScopes CodeBlock diff --git a/CodeSnippets/20888CE5-13E0-4B11-9BE3-4EEEB93DB277.codesnippet b/CodeSnippets/20888CE5-13E0-4B11-9BE3-4EEEB93DB277.codesnippet index a4f21a33..24e64f82 100644 --- a/CodeSnippets/20888CE5-13E0-4B11-9BE3-4EEEB93DB277.codesnippet +++ b/CodeSnippets/20888CE5-13E0-4B11-9BE3-4EEEB93DB277.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_macro_utils + jackie_macro_utils IDECodeSnippetCompletionScopes TopLevel @@ -65,9 +65,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - TQ Macro Utils + Macro Utils IDECodeSnippetTitle - TQ Macro Utils + Macro Utils IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/40915EF8-AAEA-4B6F-B9B4-666436184FB0.codesnippet b/CodeSnippets/40915EF8-AAEA-4B6F-B9B4-666436184FB0.codesnippet new file mode 100644 index 00000000..34d5670e --- /dev/null +++ b/CodeSnippets/40915EF8-AAEA-4B6F-B9B4-666436184FB0.codesnippet @@ -0,0 +1,26 @@ + + + + + IDECodeSnippetCompletionPrefix + @ + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + @"<#string#>" + IDECodeSnippetIdentifier + 40915EF8-AAEA-4B6F-B9B4-666436184FB0 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetSummary + String + IDECodeSnippetTitle + String + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/440EA5A0-788A-4831-B211-BECF59282544.codesnippet b/CodeSnippets/440EA5A0-788A-4831-B211-BECF59282544.codesnippet new file mode 100644 index 00000000..fbd1c33a --- /dev/null +++ b/CodeSnippets/440EA5A0-788A-4831-B211-BECF59282544.codesnippet @@ -0,0 +1,44 @@ + + + + + IDECodeSnippetCompletionPrefix + tableView (group) + IDECodeSnippetCompletionScopes + + All + + IDECodeSnippetContents + - (BaseTableView *)tableView +{ + if (!_tableView) { + _tableView = [[BaseTableView alloc] initWithFrame:self.view.bounds style:UITableViewStyleGrouped]; + _tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight; + [DataHelper setExtraCellLineHidden:_tableView]; + _tableView.delegate = self; + _tableView.dataSource = self; + + kSelf; + [_tableView addHeaderWithCallback:^{ + kSelfStrong; + [self loadData]; + }]; + } + return _tableView; + +} + + IDECodeSnippetIdentifier + 440EA5A0-788A-4831-B211-BECF59282544 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetSummary + tableView_getter(group) + IDECodeSnippetTitle + tableView_getter(group) + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/45D5535E-44FA-491F-8E4B-3251A46D5372.codesnippet b/CodeSnippets/45D5535E-44FA-491F-8E4B-3251A46D5372.codesnippet index db5e58bc..9d3b93d3 100644 --- a/CodeSnippets/45D5535E-44FA-491F-8E4B-3251A46D5372.codesnippet +++ b/CodeSnippets/45D5535E-44FA-491F-8E4B-3251A46D5372.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_sharedInstance + jackie_sharedInstance IDECodeSnippetCompletionScopes ClassImplementation @@ -23,9 +23,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq shared instance + shared instance IDECodeSnippetTitle - tq Shared Instance + Shared Instance IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/524E7A76-9BBC-4442-86F2-37DB97C7AC37.codesnippet b/CodeSnippets/524E7A76-9BBC-4442-86F2-37DB97C7AC37.codesnippet index 7baeb33f..04deda59 100644 --- a/CodeSnippets/524E7A76-9BBC-4442-86F2-37DB97C7AC37.codesnippet +++ b/CodeSnippets/524E7A76-9BBC-4442-86F2-37DB97C7AC37.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_register_nib + jackie_register_nib IDECodeSnippetCompletionScopes CodeBlock @@ -17,9 +17,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq register nib + register nib IDECodeSnippetTitle - tq register nib + register nib IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/5C97A281-F73D-44B3-953E-87BC6388831F.codesnippet b/CodeSnippets/5C97A281-F73D-44B3-953E-87BC6388831F.codesnippet new file mode 100644 index 00000000..6f95190e --- /dev/null +++ b/CodeSnippets/5C97A281-F73D-44B3-953E-87BC6388831F.codesnippet @@ -0,0 +1,27 @@ + + + + + IDECodeSnippetCompletionPrefix + jjj + IDECodeSnippetCompletionScopes + + CodeBlock + + IDECodeSnippetContents + NSString *path = [[NSBundle mainBundle] pathForResource:<#(NSString *)#> ofType:<#(NSString *)#>]; + NSData *data = [NSData dataWithContentsOfFile:path]; + NSError *error; + NSDictionary *dic = [NSJSONSerialization JSONObjectWithData:data options:NSJSONReadingMutableContainers error:&error]; + IDECodeSnippetIdentifier + 5C97A281-F73D-44B3-953E-87BC6388831F + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetTitle + Load Local Json File + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/7707FE2A-C6CF-4774-8A7D-EA6BEE058C11.codesnippet b/CodeSnippets/7707FE2A-C6CF-4774-8A7D-EA6BEE058C11.codesnippet index 3e96b3fb..2d9109e0 100644 --- a/CodeSnippets/7707FE2A-C6CF-4774-8A7D-EA6BEE058C11.codesnippet +++ b/CodeSnippets/7707FE2A-C6CF-4774-8A7D-EA6BEE058C11.codesnippet @@ -9,15 +9,15 @@ All IDECodeSnippetContents - @property (nonatomic) <#type#> <#name#>; + @property (assign, nonatomic) <#type#> <#name#>; IDECodeSnippetIdentifier 7707FE2A-C6CF-4774-8A7D-EA6BEE058C11 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq property declaration - assign + property declaration - assign IDECodeSnippetTitle - tq property declaration - assign + property declaration - assign IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet b/CodeSnippets/84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet index 8a0294ba..a6649520 100644 --- a/CodeSnippets/84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet +++ b/CodeSnippets/84587A91-678A-4727-9EBA-6F9D327EF485.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_notification + jackie_notification IDECodeSnippetCompletionScopes CodeExpression @@ -22,9 +22,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq Notification sample + Notification sample IDECodeSnippetTitle - tq Notification sample + Notification sample IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/8D68DFE7-69E7-46E6-B4F0-F3C5EEC1BC12.codesnippet b/CodeSnippets/8D68DFE7-69E7-46E6-B4F0-F3C5EEC1BC12.codesnippet index eb8ca065..ed280f70 100644 --- a/CodeSnippets/8D68DFE7-69E7-46E6-B4F0-F3C5EEC1BC12.codesnippet +++ b/CodeSnippets/8D68DFE7-69E7-46E6-B4F0-F3C5EEC1BC12.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_extension + jackie_extension IDECodeSnippetCompletionScopes TopLevel @@ -18,9 +18,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq add interface() extension + add interface() extension IDECodeSnippetTitle - tq add interface() extension + add interface() extension IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/93934053-BDF5-48C3-8B7F-08EB04D69442.codesnippet b/CodeSnippets/93934053-BDF5-48C3-8B7F-08EB04D69442.codesnippet index 004382b1..f3b55a7c 100644 --- a/CodeSnippets/93934053-BDF5-48C3-8B7F-08EB04D69442.codesnippet +++ b/CodeSnippets/93934053-BDF5-48C3-8B7F-08EB04D69442.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_init + jackie_init IDECodeSnippetCompletionScopes CodeBlock @@ -18,9 +18,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq init code + init code IDECodeSnippetTitle - tq init code + init code IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/A807145A-F6BD-412C-AA06-DC931E43F730.codesnippet b/CodeSnippets/A807145A-F6BD-412C-AA06-DC931E43F730.codesnippet index 4701e554..5a7c03e5 100644 --- a/CodeSnippets/A807145A-F6BD-412C-AA06-DC931E43F730.codesnippet +++ b/CodeSnippets/A807145A-F6BD-412C-AA06-DC931E43F730.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_hide_keyboard + jackie_hide_keyboard IDECodeSnippetCompletionScopes ClassImplementation diff --git a/CodeSnippets/A83AE4CD-E79A-464F-B849-29BEB3CF4B01.codesnippet b/CodeSnippets/A83AE4CD-E79A-464F-B849-29BEB3CF4B01.codesnippet index 7f6aa7db..bc06b748 100644 --- a/CodeSnippets/A83AE4CD-E79A-464F-B849-29BEB3CF4B01.codesnippet +++ b/CodeSnippets/A83AE4CD-E79A-464F-B849-29BEB3CF4B01.codesnippet @@ -15,9 +15,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - strong type property + property strong IDECodeSnippetTitle - tq strong type property + property strong IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/B564B787-4757-4E8E-A8A2-1299CE7B5420.codesnippet b/CodeSnippets/B564B787-4757-4E8E-A8A2-1299CE7B5420.codesnippet index 0aae6aac..efd7b933 100644 --- a/CodeSnippets/B564B787-4757-4E8E-A8A2-1299CE7B5420.codesnippet +++ b/CodeSnippets/B564B787-4757-4E8E-A8A2-1299CE7B5420.codesnippet @@ -3,36 +3,38 @@ IDECodeSnippetCompletionPrefix - tq_ape_ui_common + tableView (plain) IDECodeSnippetCompletionScopes ClassImplementation IDECodeSnippetContents - - (void)viewDidLoad { - [super viewDidLoad]; - self.view.backgroundColor = VIEW_BG_COLOR; - UIView * headerView = [HeaderUtils addCustomHeaderToView:self.view]; - UIButton * returnButton = [HeaderUtils addCustomReturnButtonToView:headerView]; - [returnButton addTouchTarget:self action:@selector(returnButtonPressed:)]; - [HeaderUtils addTitleLabelToView:headerView].text = @"<#title#>"; + - (BaseTableView *)tableView +{ + if (!_tableView) { + _tableView = [[BaseTableView alloc] initWithFrame:self.view.bounds style:UITableViewStylePlain]; + _tableView.autoresizingMask = UIViewAutoresizingFlexibleHeight; + [DataHelper setExtraCellLineHidden:_tableView]; + _tableView.delegate = self; + _tableView.dataSource = self; + + kSelf; + [_tableView addHeaderWithCallback:^{ + kSelfStrong; + [self loadData]; + }]; + } + return _tableView; - [HeaderUtils addHeaderShadowToView:self.view]; -} - -- (void)viewDidUnload { - [super viewDidUnload]; -} - - +} IDECodeSnippetIdentifier B564B787-4757-4E8E-A8A2-1299CE7B5420 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq ape ui common + tableView_getter(plain) IDECodeSnippetTitle - tq_ape_ui_common + tableView_getter(plain) IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/B9E1ED5F-F3D6-4479-A2DF-0C8B21740CD6.codesnippet b/CodeSnippets/B9E1ED5F-F3D6-4479-A2DF-0C8B21740CD6.codesnippet index 7e582f67..e7fa6cf1 100644 --- a/CodeSnippets/B9E1ED5F-F3D6-4479-A2DF-0C8B21740CD6.codesnippet +++ b/CodeSnippets/B9E1ED5F-F3D6-4479-A2DF-0C8B21740CD6.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - ttt + tableView (plain) IDECodeSnippetCompletionScopes ClassImplementation @@ -11,15 +11,18 @@ IDECodeSnippetContents #pragma mark - UITableView Datasource -- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ return 1; } -- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ return 10; } -- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ static NSString *cellIdentifier = @"Cell"; UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; @@ -35,7 +38,13 @@ #pragma mark - UITableView Delegate methods -- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath { +- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath +{ + return 44; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ } IDECodeSnippetIdentifier @@ -43,7 +52,7 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetTitle - ELC UITableView - Delegate - Datasource + UITableView - Delegate - Datasource IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/BBB93C20-EE5A-44F5-B35D-854A96E88F2D.codesnippet b/CodeSnippets/BBB93C20-EE5A-44F5-B35D-854A96E88F2D.codesnippet index 79508890..79eabf2b 100644 --- a/CodeSnippets/BBB93C20-EE5A-44F5-B35D-854A96E88F2D.codesnippet +++ b/CodeSnippets/BBB93C20-EE5A-44F5-B35D-854A96E88F2D.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_notification_call_back + jackie_notification_call_back IDECodeSnippetCompletionScopes ClassImplementation @@ -17,9 +17,9 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq notification call back method + notification call back method IDECodeSnippetTitle - tq notification call back method + notification call back method IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/C2DF7BF7-EF10-4F82-A9D3-D0E9C0991E9E.codesnippet b/CodeSnippets/C2DF7BF7-EF10-4F82-A9D3-D0E9C0991E9E.codesnippet index 587fbc0f..a65e00e0 100644 --- a/CodeSnippets/C2DF7BF7-EF10-4F82-A9D3-D0E9C0991E9E.codesnippet +++ b/CodeSnippets/C2DF7BF7-EF10-4F82-A9D3-D0E9C0991E9E.codesnippet @@ -3,7 +3,7 @@ IDECodeSnippetCompletionPrefix - tq_timer + jackie_timer IDECodeSnippetCompletionScopes CodeExpression @@ -24,9 +24,9 @@ self.<#var#> = [NSTimer scheduledTimerWithTimeInterval:1.5 IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetSummary - tq_timer + timer IDECodeSnippetTitle - tq_timer + timer IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/C73C891D-F3C0-4ACE-B762-311643CF473D.codesnippet b/CodeSnippets/C73C891D-F3C0-4ACE-B762-311643CF473D.codesnippet new file mode 100644 index 00000000..fb37e4e0 --- /dev/null +++ b/CodeSnippets/C73C891D-F3C0-4ACE-B762-311643CF473D.codesnippet @@ -0,0 +1,26 @@ + + + + + IDECodeSnippetCompletionPrefix + ccc + IDECodeSnippetCompletionScopes + + ClassInterfaceMethods + + IDECodeSnippetContents + @property (copy, nonatomic) NSString *<#name#>; + IDECodeSnippetIdentifier + C73C891D-F3C0-4ACE-B762-311643CF473D + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetSummary + property copy + IDECodeSnippetTitle + property copy + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/DA94C6FF-00F3-4E84-8645-E57FF6E4A005.codesnippet b/CodeSnippets/DA94C6FF-00F3-4E84-8645-E57FF6E4A005.codesnippet new file mode 100644 index 00000000..1215a5ca --- /dev/null +++ b/CodeSnippets/DA94C6FF-00F3-4E84-8645-E57FF6E4A005.codesnippet @@ -0,0 +1,34 @@ + + + + + IDECodeSnippetCompletionPrefix + jackie_post请求网络(新) + IDECodeSnippetCompletionScopes + + ClassImplementation + + IDECodeSnippetContents + + (void)<#api_path#>WithUserId:(NSString *)userId + hud:(NetworkHUD)hud + target:(id)target + success:(void (^)(StatusModel *data))success +{ + CreateParamsDic; + DicObjectSet([NSString isNull:userId] ? @"0" : userId , @"userId"); + + [self postDataResponsePath:<#api_path#> params:ParamsDic networkHUD:hud target:target success:success]; + +} + IDECodeSnippetIdentifier + DA94C6FF-00F3-4E84-8645-E57FF6E4A005 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetTitle + jackie_post请求网络(新) + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/E10BEAE2-7433-4892-9314-95759F276395.codesnippet b/CodeSnippets/E10BEAE2-7433-4892-9314-95759F276395.codesnippet index 85c30dc3..d6fc0adf 100644 --- a/CodeSnippets/E10BEAE2-7433-4892-9314-95759F276395.codesnippet +++ b/CodeSnippets/E10BEAE2-7433-4892-9314-95759F276395.codesnippet @@ -15,7 +15,7 @@ IDECodeSnippetLanguage Xcode.SourceCodeLanguage.Objective-C IDECodeSnippetTitle - TQ Property declaration - weak + Property declaration - weak IDECodeSnippetUserSnippet IDECodeSnippetVersion diff --git a/CodeSnippets/E6F58A52-0F4C-41C6-B676-D743164F64E9.codesnippet b/CodeSnippets/E6F58A52-0F4C-41C6-B676-D743164F64E9.codesnippet new file mode 100644 index 00000000..36374df7 --- /dev/null +++ b/CodeSnippets/E6F58A52-0F4C-41C6-B676-D743164F64E9.codesnippet @@ -0,0 +1,74 @@ + + + + + IDECodeSnippetCompletionPrefix + tableView(group) + IDECodeSnippetCompletionScopes + + ClassImplementation + + IDECodeSnippetContents + #pragma mark - UITableView Datasource + +- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 1; +} + +- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section +{ + return 10; +} + +- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath +{ + static NSString *cellIdentifier = @"Cell"; + + UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier]; + + if(cell == nil) { + cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier]; + cell.selectionStyle = UITableViewCellSelectionStyleNone; + } + + + return cell; +} +- (UIView *)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section +{ + return nil; +} + +- (UIView *)tableView:(UITableView *)tableView viewForFooterInSection:(NSInteger)section +{ + return nil; +} + +- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section +{ + return 0; +} + +#pragma mark - UITableView Delegate +- (CGFloat)tableView:(UITableView *)tableView heightForFooterInSection:(NSInteger)section +{ + return 0; +} + +- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath +{ + [tableView deselectRowAtIndexPath:indexPath animated:YES]; +} + IDECodeSnippetIdentifier + E6F58A52-0F4C-41C6-B676-D743164F64E9 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetTitle + UITableView - Delegate - Datasource + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + From 55c5ed142d014dbdb48814b741dc50457fe9cc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E4=BD=B3=E7=90=A6?= Date: Wed, 29 Jun 2016 13:49:37 +0800 Subject: [PATCH 2/2] update --- ...B5-1E70-41FB-90CC-41D21D4B4290.codesnippet | 31 +++++++++++++++++++ ...80-3782-41AB-82BE-1A276F4F2ACE.codesnippet | 30 ++++++++++++++++++ 2 files changed, 61 insertions(+) create mode 100644 CodeSnippets/29F5B9B5-1E70-41FB-90CC-41D21D4B4290.codesnippet create mode 100644 CodeSnippets/F3008180-3782-41AB-82BE-1A276F4F2ACE.codesnippet diff --git a/CodeSnippets/29F5B9B5-1E70-41FB-90CC-41D21D4B4290.codesnippet b/CodeSnippets/29F5B9B5-1E70-41FB-90CC-41D21D4B4290.codesnippet new file mode 100644 index 00000000..dbab33d4 --- /dev/null +++ b/CodeSnippets/29F5B9B5-1E70-41FB-90CC-41D21D4B4290.codesnippet @@ -0,0 +1,31 @@ + + + + + IDECodeSnippetCompletionPrefix + jackie_class + IDECodeSnippetCompletionScopes + + ClassImplementation + + IDECodeSnippetContents + +- (<#Class#> *)<#statements#> +{ + if (!_<#statements#>) { + _<#statements#> = [[<#Class#> alloc] init]; + } + return _<#statements#>; +} + IDECodeSnippetIdentifier + 29F5B9B5-1E70-41FB-90CC-41D21D4B4290 + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetTitle + lazy load + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + + diff --git a/CodeSnippets/F3008180-3782-41AB-82BE-1A276F4F2ACE.codesnippet b/CodeSnippets/F3008180-3782-41AB-82BE-1A276F4F2ACE.codesnippet new file mode 100644 index 00000000..1830a6af --- /dev/null +++ b/CodeSnippets/F3008180-3782-41AB-82BE-1A276F4F2ACE.codesnippet @@ -0,0 +1,30 @@ + + + + + IDECodeSnippetCompletionPrefix + loginVerify + IDECodeSnippetCompletionScopes + + CodeBlock + + IDECodeSnippetContents + kSelfWeak; + [self loginVerifySuccess:^{ + kSelfStrong; + + }]; + IDECodeSnippetIdentifier + F3008180-3782-41AB-82BE-1A276F4F2ACE + IDECodeSnippetLanguage + Xcode.SourceCodeLanguage.Objective-C + IDECodeSnippetSummary + loginVerify + IDECodeSnippetTitle + loginVerify + IDECodeSnippetUserSnippet + + IDECodeSnippetVersion + 2 + +