Вот быстрая версия принятого ответа.
func tableView(tableView: UITableView, willDisplayCell cell: UITableViewCell, forRowAtIndexPath indexPath: NSIndexPath) {
if (cell.respondsToSelector("tintColor")) {
var cornerRadius: CGFloat = 5;
cell.backgroundColor = UIColor.clearColor()
var layer: CAShapeLayer = CAShapeLayer()
var pathRef: CGMutablePathRef = CGPathCreateMutable()
var bounds: CGRect = CGRectInset(cell.bounds, 10, 0)
var addLine: Bool = false
if (indexPath.row == 0 && indexPath.row == tableView.numberOfRowsInSection(indexPath.section)-1) {
CGPathAddRoundedRect(pathRef, nil, bounds, cornerRadius, cornerRadius);
} else if (indexPath.row == 0) {
CGPathMoveToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMaxY(bounds));
CGPathAddArcToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMinY(bounds), CGRectGetMidX(bounds), CGRectGetMinY(bounds), cornerRadius);
CGPathAddArcToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMinY(bounds), CGRectGetMaxX(bounds), CGRectGetMidY(bounds), cornerRadius);
CGPathAddLineToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds));
addLine = true;
} else if (indexPath.row == tableView.numberOfRowsInSection(indexPath.section)-1) {
CGPathMoveToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMinY(bounds));
CGPathAddArcToPoint(pathRef, nil, CGRectGetMinX(bounds), CGRectGetMaxY(bounds), CGRectGetMidX(bounds), CGRectGetMaxY(bounds), cornerRadius);
CGPathAddArcToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMaxY(bounds), CGRectGetMaxX(bounds), CGRectGetMidY(bounds), cornerRadius);
CGPathAddLineToPoint(pathRef, nil, CGRectGetMaxX(bounds), CGRectGetMinY(bounds));
} else {
CGPathAddRect(pathRef, nil, bounds);
addLine = true;
}
layer.path = pathRef;
//CFRelease(pathRef);
//set the border color
layer.strokeColor = UIColor.lightGrayColor().CGColor;
//set the border width
layer.lineWidth = 1;
layer.fillColor = UIColor(white: 1, alpha: 1.0).CGColor;
if (addLine == true) {
var lineLayer: CALayer = CALayer();
var lineHeight: CGFloat = (1 / UIScreen.mainScreen().scale);
lineLayer.frame = CGRectMake(CGRectGetMinX(bounds), bounds.size.height-lineHeight, bounds.size.width, lineHeight);
lineLayer.backgroundColor = tableView.separatorColor!.CGColor;
layer.addSublayer(lineLayer);
}
var testView: UIView = UIView(frame:bounds)
testView.layer.insertSublayer(layer, atIndex: 0)
testView.backgroundColor = UIColor.clearColor()
cell.backgroundView = testView
}
}
SCHTASKS /Create /SC WEEKLY /D MON /TN ReportAlarm /st 16:00 /TR "c:\windows\system32\cmd /c 'Echo Report Time & Pause'"
См. schtasks /?
для помощи.
Так вы планируете задание раз в неделю.
Но вы можете использовать Windows 'Alarms and Clock с 30-минутным отсрочкой, что проще.
Нажмите Пуск , Все приложения , Будильники и часы . На вкладке Alarm нажмите большой значок + на нижней панели инструментов. Установите будильник на 16:00 , Повторите на Понедельник и Повторите на 30 минут . Назовите сигнал тревоги . Пожалуйста, отправьте отчет . Нажмите значок дискеты на нижней панели инструментов, чтобы сохранить.