Skip to content

Add object detection, tracking, mobile notifications, and search to any security camera.

noob guide

roryclear3595f08883a7
diff --git a/clearcam/LiveViewController.m b/clearcam/LiveViewController.m
index 55f42ad..0f4a21b 100644
--- a/clearcam/LiveViewController.m
+++ b/clearcam/LiveViewController.m
@@ -42,6 +42,60 @@
self.tableView.refreshControl = self.refreshControl;
}
+- (void)updateTableViewBackground {
+ if (self.deviceNames.count == 0) {
+ UILabel *messageLabel = [[UILabel alloc] initWithFrame:self.tableView.bounds];
+ messageLabel.numberOfLines = 0;
+ messageLabel.lineBreakMode = NSLineBreakByWordWrapping;
+
+ // Title centered
+ NSMutableParagraphStyle *centeredStyle = [[NSMutableParagraphStyle alloc] init];
+ centeredStyle.alignment = NSTextAlignmentCenter;
+ centeredStyle.paragraphSpacing = 12.0;
+
+ NSDictionary *titleAttrs = @{
+ NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleHeadline],
+ NSForegroundColorAttributeName: [UIColor labelColor],
+ NSParagraphStyleAttributeName: centeredStyle
+ };
+
+ NSMutableAttributedString *message = [[NSMutableAttributedString alloc] init];
+ [message appendAttributedString:[[NSAttributedString alloc] initWithString:@"No Live Devices\n\n" attributes:titleAttrs]];
+
+ // Steps with hanging indent, left-aligned
+ NSMutableParagraphStyle *stepsStyle = [[NSMutableParagraphStyle alloc] init];
+ stepsStyle.alignment = NSTextAlignmentLeft;
+ stepsStyle.headIndent = 20.0;
+ stepsStyle.firstLineHeadIndent = 0.0;
+ stepsStyle.paragraphSpacing = 8.0;
+
+ NSDictionary *stepsAttrs = @{
+ NSFontAttributeName: [UIFont preferredFontForTextStyle:UIFontTextStyleBody],
+ NSForegroundColorAttributeName: [UIColor secondaryLabelColor],
+ NSParagraphStyleAttributeName: stepsStyle
+ };
+
+ NSString *stepsText =
+ @"1. Install Clearcam on another phone.\n"
+ "2. Upgrade to Clearcam Premium (must be using the same Apple account on both phones).\n"
+ "3. Turn on \"Live Stream over Network\" on your other phone and choose a secure password and device name.\n"
+ "4. Start recording.";
+
+ [message appendAttributedString:[[NSAttributedString alloc] initWithString:stepsText attributes:stepsAttrs]];
+
+ messageLabel.attributedText = message;
+ [messageLabel sizeToFit];
+
+ self.tableView.backgroundView = messageLabel;
+ self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
+ } else {
+ self.tableView.backgroundView = nil;
+ self.tableView.separatorStyle = UITableViewCellSeparatorStyleSingleLine;
+ }
+}
+
+
+
- (void)refreshDevices {
[self fetchLiveDevices];
}
@@ -85,10 +139,12 @@
}
}
[self.tableView reloadData];
+ [self updateTableViewBackground];
});
}
}];
[task resume];
+ //[self updateTableViewBackground];
}
#pragma mark - UITableViewDataSource
diff --git a/clearcam/SettingsViewController.m b/clearcam/SettingsViewController.m
index a5ed6ca..7632f01 100644
--- a/clearcam/SettingsViewController.m
+++ b/clearcam/SettingsViewController.m
@@ -504,7 +504,7 @@
}
} else if (indexPath.section == 1) { // Live Stream Settings
if (indexPath.row == 0) {
- cell.textLabel.text = @"Live Stream over the Internet";
+ cell.textLabel.text = @"Live Stream over Network";
cell.accessoryType = UITableViewCellAccessoryNone;
UISwitch *liveStreamSwitch = [[UISwitch alloc] init];
liveStreamSwitch.on = isPremium ? self.liveStreamInternetEnabled : NO;