Skip to content

iOS: Parameters for button texts #93

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

Merged
merged 2 commits into from
Jun 12, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions nativescript-imagepicker/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,21 @@ interface Options {
*/
mode?: string;

/**
* Set the text for the done button in iOS
*/
doneText?: string;

/**
* Set the text for the cancel button in iOS
*/
cancelText?: string;

/**
* Set the text for the albums button in iOS
*/
albumsText?: string;

android?: {
/**
* Provide a reason for permission request to access external storage on api levels above 23.
Expand Down
6 changes: 3 additions & 3 deletions nativescript-imagepicker/viewmodel.ios.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ export class ImagePicker extends data_observable.Observable {
}

get doneText(): string {
return "Done";
return this._options && this._options.doneText ? this._options.doneText : "Done";
}

get cancelText(): string {
return "Cancel";
return this._options && this._options.cancelText ? this._options.cancelText : "Cancel";
}

get albumsText(): string {
return "Albums";
return this._options && this._options.albumsText ? this._options.albumsText : "Albums";
}

get mode(): string {
Expand Down