(item: ActionItemDefinition)
| 20 | } |
| 21 | |
| 22 | function loadActionIcon(item: ActionItemDefinition): any /* UIImage */ { |
| 23 | let is = null; |
| 24 | let img = null; |
| 25 | |
| 26 | const itemIcon = item.icon; |
| 27 | const itemStyle = item.style; |
| 28 | if (isFontIconURI(itemIcon)) { |
| 29 | const fontIconCode = itemIcon.split('//')[1]; |
| 30 | const font = itemStyle.fontInternal; |
| 31 | const color = itemStyle.color; |
| 32 | is = ImageSource.fromFontIconCodeSync(fontIconCode, font, color); |
| 33 | } else { |
| 34 | is = ImageSource.fromFileOrResourceSync(itemIcon); |
| 35 | } |
| 36 | |
| 37 | if (is && is.ios) { |
| 38 | img = is.ios; |
| 39 | } else { |
| 40 | traceMissingIcon(itemIcon); |
| 41 | } |
| 42 | |
| 43 | return img; |
| 44 | } |
| 45 | |
| 46 | @NativeClass |
| 47 | class TapBarItemHandlerImpl extends NSObject { |
no test coverage detected