Commit 1eec3cd3 authored by Wei Han's avatar Wei Han

code update

parent 61a8bfd5
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
KnMHH8GU4NZESWbs6/0uU5WX8uA= EqtjfGVJUrKupCnFW6lfffSo2ZA=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
ScoY0XAgmZ3U9Q0BvlfgQfJm2bo= w8N5kkR8hr/wIwb/x0XA5+wVpdo=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
aLAhYopvL1Lb4CTMG5A8x8RAmnkpXwHQbjsJdpq8gYg= k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
KnMHH8GU4NZESWbs6/0uU5WX8uA= EqtjfGVJUrKupCnFW6lfffSo2ZA=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
JGviPenfphujtQEGyJZCIZTsd2c= uEkE+l7bQzwu7vnX83uBlOCEpCk=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
aLAhYopvL1Lb4CTMG5A8x8RAmnkpXwHQbjsJdpq8gYg= k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -20,8 +20,27 @@ ...@@ -20,8 +20,27 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.view.backgroundColor = [UIColor systemGroupedBackgroundColor];
// --- Base background (replaces systemGroupedBackground) ---
self.view.backgroundColor = [UIColor whiteColor];
// --- Header bar color ---
self.headerView.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0]; // teal
self.titleLabel.textColor = [UIColor whiteColor];
// --- TableView styling ---
self.tableView.backgroundColor = [UIColor colorWithWhite:0.97 alpha:1.0]; // very light gray
self.tableView.separatorColor = [UIColor colorWithWhite:0.9 alpha:1.0];
// --- Section header label colors ---
self.tableView.sectionIndexColor = [UIColor darkGrayColor];
// --- Optional: consistent scroll indicator style ---
self.tableView.indicatorStyle = UIScrollViewIndicatorStyleBlack;
// --- Tint / global accent color (used for buttons, etc) ---
self.view.tintColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0];
[self setupHeader]; [self setupHeader];
[self setupTableView]; [self setupTableView];
[self handleIssues]; [self handleIssues];
...@@ -36,7 +55,8 @@ ...@@ -36,7 +55,8 @@
#pragma mark - Header #pragma mark - Header
- (void)setupHeader { - (void)setupHeader {
self.headerView = [[UIView alloc] init]; CGFloat statusBarHeight = UIApplication.sharedApplication.statusBarFrame.size.height;
self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, statusBarHeight + 60)];
self.headerView.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0]; self.headerView.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0];
self.headerView.translatesAutoresizingMaskIntoConstraints = NO; self.headerView.translatesAutoresizingMaskIntoConstraints = NO;
[self.view addSubview:self.headerView]; [self.view addSubview:self.headerView];
...@@ -56,13 +76,6 @@ ...@@ -56,13 +76,6 @@
self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO; self.titleLabel.translatesAutoresizingMaskIntoConstraints = NO;
[self.headerView addSubview:self.titleLabel]; [self.headerView addSubview:self.titleLabel];
self.addInfoButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.addInfoButton setImage:[UIImage systemImageNamed:@"plus"] forState:UIControlStateNormal];
self.addInfoButton.tintColor = UIColor.whiteColor;
self.addInfoButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.addInfoButton addTarget:self action:@selector(addInfoTapped) forControlEvents:UIControlEventTouchUpInside];
[self.headerView addSubview:self.addInfoButton];
[NSLayoutConstraint activateConstraints:@[ [NSLayoutConstraint activateConstraints:@[
[self.headerView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor], [self.headerView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor],
[self.headerView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor], [self.headerView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
...@@ -72,9 +85,6 @@ ...@@ -72,9 +85,6 @@
[self.backButton.leadingAnchor constraintEqualToAnchor:self.headerView.leadingAnchor constant:12], [self.backButton.leadingAnchor constraintEqualToAnchor:self.headerView.leadingAnchor constant:12],
[self.backButton.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor], [self.backButton.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor],
[self.addInfoButton.trailingAnchor constraintEqualToAnchor:self.headerView.trailingAnchor constant:-12],
[self.addInfoButton.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor],
[self.titleLabel.centerXAnchor constraintEqualToAnchor:self.headerView.centerXAnchor], [self.titleLabel.centerXAnchor constraintEqualToAnchor:self.headerView.centerXAnchor],
[self.titleLabel.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor], [self.titleLabel.centerYAnchor constraintEqualToAnchor:self.headerView.centerYAnchor],
]]; ]];
...@@ -87,6 +97,9 @@ ...@@ -87,6 +97,9 @@
self.tableView.delegate = self; self.tableView.delegate = self;
self.tableView.dataSource = self; self.tableView.dataSource = self;
self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone; self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
self.tableView.backgroundView = nil;
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.opaque = YES;
[self.view addSubview:self.tableView]; [self.view addSubview:self.tableView];
[NSLayoutConstraint activateConstraints:@[ [NSLayoutConstraint activateConstraints:@[
...@@ -186,6 +199,9 @@ ...@@ -186,6 +199,9 @@
if (!cell) { if (!cell) {
cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier]; cell = [[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:identifier];
cell.selectionStyle = UITableViewCellSelectionStyleNone; cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = [UIColor clearColor];
cell.contentView.backgroundColor = [UIColor clearColor];
UIView *card = [[UIView alloc] init]; UIView *card = [[UIView alloc] init];
card.tag = 100; card.tag = 100;
......
...@@ -14,6 +14,7 @@ ...@@ -14,6 +14,7 @@
@property (nonatomic, strong) UIView *detailsCard; @property (nonatomic, strong) UIView *detailsCard;
@property (nonatomic, strong) UIButton *editButton; @property (nonatomic, strong) UIButton *editButton;
@property (nonatomic, strong) UIButton *deleteButton; @property (nonatomic, strong) UIButton *deleteButton;
@property (nonatomic, strong) UIImageView *floorPlanThumbnail;
@end @end
...@@ -150,10 +151,32 @@ ...@@ -150,10 +151,32 @@
CGFloat y = 20; CGFloat y = 20;
// --- Reference ID --- // --- Reference ID ---
self.refLabel = [[UILabel alloc] initWithFrame:CGRectMake(padding, y, self.view.bounds.size.width - 2*padding, 24)]; CGFloat thumbWidth = 40;
CGFloat gap = 12;
self.refLabel = [[UILabel alloc] initWithFrame:CGRectMake(padding, y, self.view.bounds.size.width - 2*padding - thumbWidth - gap, 24)];
self.refLabel.font = [UIFont boldSystemFontOfSize:20]; self.refLabel.font = [UIFont boldSystemFontOfSize:20];
self.refLabel.textColor = UIColor.blackColor; // make sure it’s visible
self.refLabel.numberOfLines = 1;
self.refLabel.adjustsFontSizeToFitWidth = YES;
[self.detailsCard addSubview:self.refLabel]; [self.detailsCard addSubview:self.refLabel];
y += 36; y += 36;
// --- Floor Plan Thumbnail ---
CGFloat thumbSize = 100; // new size
self.floorPlanThumbnail = [[UIImageView alloc] initWithFrame:
CGRectMake(self.view.bounds.size.width - padding - thumbSize, 20, thumbSize, thumbSize)];
self.floorPlanThumbnail.contentMode = UIViewContentModeScaleAspectFill;
self.floorPlanThumbnail.clipsToBounds = YES;
self.floorPlanThumbnail.layer.cornerRadius = 4;
self.floorPlanThumbnail.backgroundColor = [UIColor colorWithWhite:0.9 alpha:1];
self.floorPlanThumbnail.layer.borderColor = [UIColor systemGray3Color].CGColor;
self.floorPlanThumbnail.layer.borderWidth = 1.0;
self.floorPlanThumbnail.userInteractionEnabled = YES;
UITapGestureRecognizer *tap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(handleFloorPlanTap)];
[self.floorPlanThumbnail addGestureRecognizer:tap];
[self.detailsCard addSubview:self.floorPlanThumbnail];
// --- Status Capsule --- // --- Status Capsule ---
self.statusLabel = [[UILabel alloc] initWithFrame:CGRectMake(padding, y, 90, 28)]; self.statusLabel = [[UILabel alloc] initWithFrame:CGRectMake(padding, y, 90, 28)];
...@@ -341,6 +364,20 @@ ...@@ -341,6 +364,20 @@
} }
}); });
} }
NSString *planThumbURL = self.issueData[@"plan_image_thumb"];
if (planThumbURL.length > 0) {
NSURL *url = [NSURL URLWithString:planThumbURL];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *data = [NSData dataWithContentsOfURL:url];
if (data) {
UIImage *img = [UIImage imageWithData:data];
dispatch_async(dispatch_get_main_queue(), ^{
self.floorPlanThumbnail.image = img;
});
}
});
}
} }
- (void)scrollViewDidScroll:(UIScrollView *)scrollView { - (void)scrollViewDidScroll:(UIScrollView *)scrollView {
...@@ -378,7 +415,6 @@ ...@@ -378,7 +415,6 @@
}]; }];
} }
- (void)closeFullImage { - (void)closeFullImage {
UIView *overlay = [self.view viewWithTag:900]; UIView *overlay = [self.view viewWithTag:900];
if (!overlay) return; if (!overlay) return;
...@@ -390,6 +426,53 @@ ...@@ -390,6 +426,53 @@
}]; }];
} }
- (void)handleFloorPlanTap {
NSString *planFullURL = self.issueData[@"plan_image"];
if (planFullURL.length == 0) return; // no full image available
UIView *overlay = [[UIView alloc] initWithFrame:self.view.bounds];
overlay.backgroundColor = [UIColor colorWithWhite:0 alpha:0.95];
overlay.alpha = 0;
overlay.tag = 901;
overlay.userInteractionEnabled = YES;
[self.view addSubview:overlay];
UIImageView *fullImageView = [[UIImageView alloc] initWithFrame:overlay.bounds];
fullImageView.contentMode = UIViewContentModeScaleAspectFit;
fullImageView.userInteractionEnabled = YES;
[overlay addSubview:fullImageView];
// Fetch the full-resolution image asynchronously
NSURL *url = [NSURL URLWithString:planFullURL];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0), ^{
NSData *data = [NSData dataWithContentsOfURL:url];
if (data) {
UIImage *img = [UIImage imageWithData:data];
dispatch_async(dispatch_get_main_queue(), ^{
fullImageView.image = img;
});
}
});
UITapGestureRecognizer *dismissTap = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(closeFullFloorPlan)];
[overlay addGestureRecognizer:dismissTap];
[UIView animateWithDuration:0.25 animations:^{
overlay.alpha = 1;
}];
}
- (void)closeFullFloorPlan {
UIView *overlay = [self.view viewWithTag:901];
if (!overlay) return;
[UIView animateWithDuration:0.25 animations:^{
overlay.alpha = 0;
} completion:^(BOOL finished) {
[overlay removeFromSuperview];
}];
}
#pragma mark - Helper #pragma mark - Helper
- (UIColor *)colorFromHex:(NSString *)hexString { - (UIColor *)colorFromHex:(NSString *)hexString {
if (!hexString || hexString.length < 6) return [UIColor grayColor]; if (!hexString || hexString.length < 6) return [UIColor grayColor];
...@@ -414,7 +497,7 @@ ...@@ -414,7 +497,7 @@
HistoryViewController *nextVC = [[HistoryViewController alloc] init]; HistoryViewController *nextVC = [[HistoryViewController alloc] init];
nextVC.modalPresentationStyle = UIModalPresentationFullScreen; nextVC.modalPresentationStyle = UIModalPresentationFullScreen;
nextVC.issueID = self.issueData[@"issue_id"] ?: @""; nextVC.issueID = [NSString stringWithFormat:@"%@", self.issueData[@"issue_reference_id"] ?: self.issueData[@"id"] ?: @""];
nextVC.planID = self.issueData[@"plan_id"]; nextVC.planID = self.issueData[@"plan_id"];
nextVC.status = self.issueData[@"status_external"]; nextVC.status = self.issueData[@"status_external"];
nextVC.unitName = self.issueData[@"plan_unit"]; nextVC.unitName = self.issueData[@"plan_unit"];
......
...@@ -25,12 +25,13 @@ ...@@ -25,12 +25,13 @@
self.backgroundColor = UIColor.clearColor; self.backgroundColor = UIColor.clearColor;
UIView *card = [[UIView alloc] init]; UIView *card = [[UIView alloc] init];
card.backgroundColor = UIColor.whiteColor; card.layer.borderWidth = 1.0;
card.layer.cornerRadius = 12; card.layer.borderColor = [UIColor colorWithWhite:0.85 alpha:1.0].CGColor;
card.layer.shadowColor = [UIColor colorWithWhite:0 alpha:0.15].CGColor; card.layer.shadowColor = [UIColor colorWithWhite:0.0 alpha:0.2].CGColor;
card.layer.shadowOpacity = 0.1; card.layer.shadowOpacity = 0.25;
card.layer.shadowRadius = 3; card.layer.shadowRadius = 4;
card.layer.shadowOffset = CGSizeMake(0, 2); card.layer.shadowOffset = CGSizeMake(0, 2);
card.layer.masksToBounds = NO;
card.translatesAutoresizingMaskIntoConstraints = NO; card.translatesAutoresizingMaskIntoConstraints = NO;
[self.contentView addSubview:card]; [self.contentView addSubview:card];
...@@ -137,7 +138,7 @@ ...@@ -137,7 +138,7 @@
- (void)viewDidLoad { - (void)viewDidLoad {
[super viewDidLoad]; [super viewDidLoad];
self.view.backgroundColor = [UIColor systemGroupedBackgroundColor]; self.view.backgroundColor = [UIColor whiteColor];
[self setupHeader]; [self setupHeader];
[self setupFilterBar]; [self setupFilterBar];
[self setupSearchBar]; [self setupSearchBar];
...@@ -153,7 +154,8 @@ ...@@ -153,7 +154,8 @@
#pragma mark - Setup UI #pragma mark - Setup UI
- (void)setupHeader { - (void)setupHeader {
self.headerView = [[UIView alloc] init]; CGFloat statusBarHeight = UIApplication.sharedApplication.statusBarFrame.size.height;
self.headerView = [[UIView alloc] initWithFrame:CGRectMake(0, 0, self.view.bounds.size.width, statusBarHeight + 60)];
self.headerView.translatesAutoresizingMaskIntoConstraints = NO; self.headerView.translatesAutoresizingMaskIntoConstraints = NO;
self.headerView.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0]; // THEME COLOR self.headerView.backgroundColor = [UIColor colorWithRed:0.0 green:0.43 blue:0.55 alpha:1.0]; // THEME COLOR
[self.view addSubview:self.headerView]; [self.view addSubview:self.headerView];
...@@ -176,7 +178,7 @@ ...@@ -176,7 +178,7 @@
// Withdraw Button // Withdraw Button
self.withdrawButton = [UIButton buttonWithType:UIButtonTypeSystem]; self.withdrawButton = [UIButton buttonWithType:UIButtonTypeSystem];
[self.withdrawButton setImage:[UIImage systemImageNamed:@"tray.and.arrow.down"] forState:UIControlStateNormal]; [self.withdrawButton setImage:[UIImage systemImageNamed:@"checklist.checked"] forState:UIControlStateNormal];
self.withdrawButton.tintColor = UIColor.whiteColor; self.withdrawButton.tintColor = UIColor.whiteColor;
self.withdrawButton.translatesAutoresizingMaskIntoConstraints = NO; self.withdrawButton.translatesAutoresizingMaskIntoConstraints = NO;
[self.withdrawButton addTarget:self action:@selector(withdrawTapped) forControlEvents:UIControlEventTouchUpInside]; [self.withdrawButton addTarget:self action:@selector(withdrawTapped) forControlEvents:UIControlEventTouchUpInside];
...@@ -190,6 +192,7 @@ ...@@ -190,6 +192,7 @@
self.filterButton.layer.borderWidth = 0.5; self.filterButton.layer.borderWidth = 0.5;
self.filterButton.layer.borderColor = [UIColor lightGrayColor].CGColor; self.filterButton.layer.borderColor = [UIColor lightGrayColor].CGColor;
[self.filterButton setTitle:@"Filter: All" forState:UIControlStateNormal]; [self.filterButton setTitle:@"Filter: All" forState:UIControlStateNormal];
[self.filterButton setTitleColor:[UIColor blackColor] forState:UIControlStateNormal];
self.filterButton.tintColor = UIColor.labelColor; self.filterButton.tintColor = UIColor.labelColor;
self.filterButton.backgroundColor = UIColor.whiteColor; self.filterButton.backgroundColor = UIColor.whiteColor;
self.filterButton.titleLabel.font = [UIFont systemFontOfSize:15]; self.filterButton.titleLabel.font = [UIFont systemFontOfSize:15];
...@@ -205,6 +208,35 @@ ...@@ -205,6 +208,35 @@
self.searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone; self.searchBar.autocapitalizationType = UITextAutocapitalizationTypeNone;
self.searchBar.autocorrectionType = UITextAutocorrectionTypeNo; self.searchBar.autocorrectionType = UITextAutocorrectionTypeNo;
self.searchBar.returnKeyType = UIReturnKeyDone; self.searchBar.returnKeyType = UIReturnKeyDone;
self.searchBar.showsCancelButton = YES;
self.searchBar.barTintColor = [UIColor whiteColor];
self.searchBar.backgroundImage = [UIImage new];
self.searchBar.opaque = YES;
// ✅ Customize the internal text field
UITextField *textField = [self.searchBar valueForKey:@"searchField"];
if (textField) {
textField.textColor = [UIColor blackColor];
textField.tintColor = [UIColor darkGrayColor];
textField.backgroundColor = [UIColor whiteColor];
textField.layer.borderColor = [UIColor lightGrayColor].CGColor;
textField.layer.borderWidth = 1.0;
textField.layer.cornerRadius = 8.0;
textField.clipsToBounds = YES;
textField.attributedPlaceholder = [[NSAttributedString alloc]
initWithString:self.searchBar.placeholder
attributes:@{NSForegroundColorAttributeName: [UIColor grayColor]}];
}
UIButton *cancelButton = [self.searchBar valueForKey:@"cancelButton"];
if (cancelButton) {
[cancelButton setTitleColor:[UIColor systemBlueColor] forState:UIControlStateNormal];
[cancelButton setTitleColor:[UIColor grayColor] forState:UIControlStateHighlighted];
cancelButton.titleLabel.font = [UIFont boldSystemFontOfSize:16];
}
[self.view addSubview:self.searchBar]; [self.view addSubview:self.searchBar];
} }
...@@ -213,6 +245,9 @@ ...@@ -213,6 +245,9 @@
self.tableView.translatesAutoresizingMaskIntoConstraints = NO; self.tableView.translatesAutoresizingMaskIntoConstraints = NO;
self.tableView.delegate = self; self.tableView.delegate = self;
self.tableView.dataSource = self; self.tableView.dataSource = self;
self.tableView.backgroundView = nil;
self.tableView.backgroundColor = [UIColor whiteColor];
self.tableView.opaque = YES;
[self.tableView registerClass:[IssueCell class] forCellReuseIdentifier:@"IssueCell"]; [self.tableView registerClass:[IssueCell class] forCellReuseIdentifier:@"IssueCell"];
// 🔹 Section header behavior // 🔹 Section header behavior
...@@ -332,10 +367,21 @@ ...@@ -332,10 +367,21 @@
NSString *reference = [issue[@"reference"] ?: @"" uppercaseString]; NSString *reference = [issue[@"reference"] ?: @"" uppercaseString];
NSString *location = [issue[@"location_name"] ?: @"" uppercaseString]; NSString *location = [issue[@"location_name"] ?: @"" uppercaseString];
NSString *remarks = [issue[@"remarks"] ?: @"" uppercaseString]; NSString *remarks = [issue[@"remarks"] ?: @"" uppercaseString];
NSString *createdAt = [issue[@"created_at"] ?: @"" uppercaseString];
NSString *category = [issue[@"category"] ?: @"" uppercaseString];
NSString *type = [issue[@"type"] ?: @"" uppercaseString];
NSString *issueText = [issue[@"issue"] ?: @"" uppercaseString];
NSString *status = [issue[@"status_external"] ?: @"" uppercaseString];
if ([reference containsString:search] || if ([reference containsString:search] ||
[location containsString:search] || [location containsString:search] ||
[remarks containsString:search]) { [remarks containsString:search] ||
[createdAt containsString:search] ||
[category containsString:search] ||
[type containsString:search] ||
[issueText containsString:search] ||
[status containsString:search]) {
[matches addObject:issue]; [matches addObject:issue];
} }
} }
...@@ -678,4 +724,21 @@ ...@@ -678,4 +724,21 @@
[self presentViewController:detailVC animated:YES completion:nil]; [self presentViewController:detailVC animated:YES completion:nil];
} }
#pragma mark - UISearchBarDelegate
-(void)searchbar:(UISearchBar *)searchBar textDidChange:(NSString *)searchText {
[self applySearch:searchText];
}
-(void)searchBarSearchButtonClicked:(UISearchBar *)searchBar {
[searchBar resignFirstResponder];
[self applySearch:searchBar.text];
}
- (void)searchBarCancelButtonClicked:(UISearchBar *)searchBar {
// Optional: reset search when user cancels
[searchBar resignFirstResponder];
searchBar.text = @"";
[self applySearch:@""];
}
@end @end
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
KnMHH8GU4NZESWbs6/0uU5WX8uA= EqtjfGVJUrKupCnFW6lfffSo2ZA=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
ScoY0XAgmZ3U9Q0BvlfgQfJm2bo= w8N5kkR8hr/wIwb/x0XA5+wVpdo=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
aLAhYopvL1Lb4CTMG5A8x8RAmnkpXwHQbjsJdpq8gYg= k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<dict> <dict>
<key>Assets.car</key> <key>Assets.car</key>
<data> <data>
KnMHH8GU4NZESWbs6/0uU5WX8uA= EqtjfGVJUrKupCnFW6lfffSo2ZA=
</data> </data>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
<data> <data>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</data> </data>
<key>Info.plist</key> <key>Info.plist</key>
<data> <data>
JGviPenfphujtQEGyJZCIZTsd2c= uEkE+l7bQzwu7vnX83uBlOCEpCk=
</data> </data>
<key>Modules/module.modulemap</key> <key>Modules/module.modulemap</key>
<data> <data>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<dict> <dict>
<key>hash2</key> <key>hash2</key>
<data> <data>
aLAhYopvL1Lb4CTMG5A8x8RAmnkpXwHQbjsJdpq8gYg= k78SvGog/XWiM8sEWRQ8ZyFHnocCgVMjS4SisBwChjI=
</data> </data>
</dict> </dict>
<key>Headers/QmsPlugin.h</key> <key>Headers/QmsPlugin.h</key>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment