Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ios): expose api to use sf images #11050

Merged
merged 24 commits into from
Aug 29, 2019
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
6d31046
chore(ios) : Added support for Xcode 11 / iOS 13 dev environment
vijaysingh-axway Jun 4, 2019
749c396
Merge branch 'master' into TIMOB-27125
vijaysingh-axway Jun 11, 2019
877accd
Merge branch 'master' into TIMOB-27125
vijaysingh-axway Jun 20, 2019
e5bd9fc
feat(iOS): Removed IS_XCODE_9 constants from code
vijaysingh-axway Jun 24, 2019
1484cad
Merge branch 'master' into TIMOB-27125
vijaysingh-axway Jun 24, 2019
719c9f9
Merge branch 'master' into TIMOB-27125
vijaysingh-axway Jul 12, 2019
99c59ee
feat(ios): add api to expose sf images
vijaysingh-axway Jul 12, 2019
57c2021
feat(ios): expose sf symbol api
vijaysingh-axway Jul 13, 2019
fa52349
feat(ios): added doc
vijaysingh-axway Jul 15, 2019
fe2d796
Merge remote-tracking branch 'upstream/master' into TIMOB-27133
vijaysingh-axway Jul 18, 2019
939979e
feat(ios): updated constants
vijaysingh-axway Jul 18, 2019
be319ec
Update doc
vijaysingh-axway Jul 23, 2019
8fb69f2
Update doc
vijaysingh-axway Jul 23, 2019
bc2360f
Update doc
vijaysingh-axway Jul 23, 2019
0bfdbad
Merge branch 'master' into TIMOB-27133
vijaysingh-axway Jul 23, 2019
d6473b8
feat(ios): added unit test
vijaysingh-axway Jul 30, 2019
5a51997
Merge branch 'master' into TIMOB-27133
vijaysingh-axway Jul 31, 2019
ba46e6c
Merge branch 'master' into TIMOB-27133
ssjsamir Aug 20, 2019
cfd9853
Merge branch 'master' into TIMOB-27133
ssjsamir Aug 22, 2019
2986493
fix(ios): properly include TiBlob for device builds
hansemannn Aug 22, 2019
942aba6
fix(ios): properly support tab bar icons
hansemannn Aug 22, 2019
1cfc4da
Merge pull request #4 from hansemannn/TIMOB-27133-fix
vijaysingh-axway Aug 22, 2019
bc78932
fix(ios): formatting fixed
vijaysingh-axway Aug 29, 2019
46fca0c
Merge branch 'master' into TIMOB-27133
sgtcoolguy Aug 29, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions apidoc/Titanium/UI/iOS/iOS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,21 @@ methods:
since: "5.2.0"
osver: {ios: {min: "9.1"}}

- name: systemImage
summary: |
Get image from SF Symbol provided by Apple.
vijaysingh-axway marked this conversation as resolved.
Show resolved Hide resolved
description: |
More details on SF Symbols can be found from https://developer.apple.com/design/human-interface-guidelines/sf-symbols/overview.
vijaysingh-axway marked this conversation as resolved.
Show resolved Hide resolved
One can download SF Symbols app from https://developer.apple.com/design/downloads/SF-Symbols.dmg and
can get the inbuilt SF Symbol name.
vijaysingh-axway marked this conversation as resolved.
Show resolved Hide resolved
parameters:
- name: name
summary: Name of SF Symbol.
type: String
returns:
- type: Titanium.Blob
since: "8.2.0"
osver: {ios: {min: "13.0"}}
properties:
- name: LARGE_TITLE_DISPLAY_MODE_AUTOMATIC
summary: |
Expand Down
13 changes: 13 additions & 0 deletions iphone/Classes/TiUIiOSProxy.m
Original file line number Diff line number Diff line change
Expand Up @@ -388,6 +388,19 @@ - (TiUIiOSSystemIconProxy *)SystemIcon
}
#endif

#ifdef IS_SDK_IOS_13
- (TiBlob *)systemImage:(id)arg
{
if (![TiUtils isIOSVersionOrGreater:@"13.0"]) {
return nil;
}
ENSURE_SINGLE_ARG_OR_NIL(arg, NSString);
UIImage *image = [UIImage systemImageNamed:arg];
TiBlob *blob = [[TiBlob alloc] initWithImage:image];
return blob;
}
#endif

- (void)setAppBadge:(id)value
{
ENSURE_UI_THREAD(setAppBadge, value);
Expand Down
3 changes: 2 additions & 1 deletion iphone/TitaniumKit/TitaniumKit/Sources/API/TiUIView.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
#import "Ti3DMatrix.h"
#import "TiApp.h"
#import "TiBase.h"
#import "TiBlob.h"
#import "TiColor.h"
#import "TiRect.h"
#import "TiUtils.h"
Expand Down Expand Up @@ -312,7 +313,7 @@ - (UIImage *)loadImage:(id)image
if (image == nil)
return nil;
NSURL *url = [TiUtils toURL:image proxy:proxy];
if (url == nil) {
if (url == nil && ![image isKindOfClass:[TiBlob class]]) {
NSLog(@"[WARN] could not find image: %@", image);
return nil;
}
Expand Down