STBMKViewC.m 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. //
  2. // STBMKViewC.m
  3. // BuguLive
  4. //
  5. // Created by 岳克奎 on 17/4/27.
  6. // Copyright © 2017年 xfg. All rights reserved.
  7. //
  8. #import "STBMKViewC.h"
  9. @interface STBMKViewC ()
  10. @end
  11. @implementation STBMKViewC
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. // Do any additional setup after loading the view from its nib.
  15. }
  16. - (void)didReceiveMemoryWarning {
  17. [super didReceiveMemoryWarning];
  18. // Dispose of any resources that can be recreated.
  19. }
  20. #pragma **************************** Getter 区域 ***************************
  21. #pragma mark -- stBMKView
  22. -(STBMKView *)stBMKView{
  23. if (!_stBMKView) {
  24. _stBMKView = (STBMKView *)[STBMKView showSTBaseViewOnSuperView:self.view
  25. loadNibNamedStr:@"STBMKView"
  26. andFrameRect:CGRectMake(0, 0, kScreenW, kScreenH)
  27. andComplete:^(BOOL finished,
  28. STBaseView *stBaseView) {
  29. }];
  30. [_stBMKView setDelegate:self];
  31. [_stBMKView setBaseDelegate:self];
  32. _stBMKView.tableView.mj_footer.hidden = YES;
  33. }
  34. return _stBMKView;
  35. }
  36. #pragma **************************** Delegate 协议方法 区域 ***************************
  37. #pragma mark ---------------<STTableViewBaseViewDelegate>
  38. -(void)showTableViewDidSelectIndexpath:(NSIndexPath *)indexPath
  39. andSTTableBaseView:(STTableBaseView *)stTableBaseView{
  40. if (indexPath.section == 0) {
  41. return;
  42. }
  43. STBMKCenter *stBMKCenter = [STBMKCenter shareManager];
  44. if (indexPath.section == 1) {
  45. if(indexPath.row == 0){
  46. stBMKCenter.provinceStr = ASLocalizedString(@"不显示");
  47. stBMKCenter.cityNameStr = ASLocalizedString(@"不显示");
  48. stBMKCenter.detailAdressStr = ASLocalizedString(@"不显示");
  49. stBMKCenter.latitudeValue = 0;
  50. stBMKCenter.longitudeValue = 0;
  51. }else{
  52. }
  53. }
  54. if (indexPath.section == 2) {
  55. STBMKView *stBMKView = (STBMKView *)stTableBaseView;
  56. BMKPoiInfo *info = stBMKView.dataSoureMArray[indexPath.row];
  57. stBMKCenter.districtStr = info.name;
  58. stBMKCenter.detailAdressStr = info.address;
  59. stBMKCenter.latitudeValue = info.pt.latitude;
  60. stBMKCenter.longitudeValue = info.pt.longitude;
  61. }
  62. if (_delegate &&[_delegate respondsToSelector:@selector(showUpdateLoactionInfoOfIndexPath)]) {
  63. [self.navigationController popViewControllerAnimated:YES];
  64. [_delegate showUpdateLoactionInfoOfIndexPath];
  65. }
  66. }
  67. -(void)setDelegate:(id<STBMKViewCDelegate>)delegate{
  68. _delegate = delegate;
  69. }
  70. @end