зеркало из https://github.com/nextcloud/talk-ios.git
Add custom checkboxes to multiselection tables.
Signed-off-by: Ivan Sein <ivan@nextcloud.com>
This commit is contained in:
Родитель
5a0fefc779
Коммит
801455efe4
|
@ -308,7 +308,10 @@
|
|||
|
||||
cell.contactImage.layer.cornerRadius = 24.0;
|
||||
cell.contactImage.layer.masksToBounds = YES;
|
||||
cell.accessoryType = ([self isParticipantAlreadySelected:participant]) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||
|
||||
UIImageView *checkboxChecked = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-checked"]];
|
||||
UIImageView *checkboxUnchecked = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-unchecked"]];
|
||||
cell.accessoryView = ([self isParticipantAlreadySelected:participant]) ? checkboxChecked : checkboxUnchecked;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-checked.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-checked@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-checked@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 633 B |
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked@2x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked@2x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.2 KiB |
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked@3x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-checked.imageset/checkbox-checked@3x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.7 KiB |
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-unchecked.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-unchecked@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "checkbox-unchecked@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 693 B |
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked@2x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked@2x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 1.4 KiB |
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked@3x.png
поставляемый
Normal file
Двоичные данные
VideoCalls/Images.xcassets/checkbox-unchecked.imageset/checkbox-unchecked@3x.png
поставляемый
Normal file
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 2.1 KiB |
|
@ -78,10 +78,10 @@
|
|||
cell.contactImage.layer.cornerRadius = 24.0;
|
||||
cell.contactImage.layer.masksToBounds = YES;
|
||||
|
||||
cell.accessoryType = UITableViewCellAccessoryNone;
|
||||
cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-unchecked"]];
|
||||
for (NCUser *user in _selectedParticipants) {
|
||||
if ([user.userId isEqualToString:contact.userId]) {
|
||||
cell.accessoryType = UITableViewCellAccessoryCheckmark;
|
||||
cell.accessoryView = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-checked"]];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -277,7 +277,10 @@
|
|||
|
||||
cell.contactImage.layer.cornerRadius = 24.0;
|
||||
cell.contactImage.layer.masksToBounds = YES;
|
||||
cell.accessoryType = ([self isParticipantAlreadySelected:participant]) ? UITableViewCellAccessoryCheckmark : UITableViewCellAccessoryNone;
|
||||
|
||||
UIImageView *checkboxChecked = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-checked"]];
|
||||
UIImageView *checkboxUnchecked = [[UIImageView alloc] initWithImage:[UIImage imageNamed:@"checkbox-unchecked"]];
|
||||
cell.accessoryView = ([self isParticipantAlreadySelected:participant]) ? checkboxChecked : checkboxUnchecked;
|
||||
|
||||
return cell;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче