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

Change background color #94

Closed
MunazR opened this issue Aug 29, 2017 · 16 comments
Closed

Change background color #94

MunazR opened this issue Aug 29, 2017 · 16 comments

Comments

@MunazR
Copy link

MunazR commented Aug 29, 2017

Is there a way to change the background color of the photo view for iOS? Currently it is black.

@diegotsi
Copy link

I need to know too. Actually, I'd like to put one loading indicator.How Can i do this?

@MunazR
Copy link
Author

MunazR commented Sep 8, 2017

I created a fork of the repo with the background color set to white if anybody is interested

https://github.com/MunazR/react-native-photo-view

@GibranPolonsky
Copy link

I think this is a great point, we still need this.

@alwx
Copy link
Owner

alwx commented Sep 29, 2017

Fixed in 848bcdf

@alwx alwx closed this as completed Sep 29, 2017
@MunazR
Copy link
Author

MunazR commented Oct 1, 2017

Thank you!

@douglasjunior
Copy link

douglasjunior commented Oct 3, 2017

Why was the color changed to white? Most other apps use black. Like Facebook and Whatsapp.

@edwardgalligan
Copy link
Contributor

Fixed

This seems an odd fix. I think the original issue was requesting a configurable background colour, not a global change to a different unconfigurable one.

I came here looking for a way to change it away from black myself, but I do think black is a good default value.

@edwardgalligan
Copy link
Contributor

For anyone finding this issue:

I've patched my own copy of react-native-photo-view by changing the colour in RNPhotoView.m to [UIColor clearColor] - this works best as it allows you to then set any colour on the background of the parent.

@maciekstosio
Copy link

How is it now? Because I've got black background, but actually I prefer white one...

@drpiou
Copy link

drpiou commented Feb 7, 2018

Still cannot change background color for iOS, Android is working fine...

@ben-snaize
Copy link

+1 - we need a fix for this.

@SimonErich
Copy link

+1

@lucidtheory
Copy link

It does work

You need to uninstall the app from your simulator and also in package.json install directly from the github repo

  "dependencies": {
    .....other dependencies
    "react-native-photo-view": "github:alwx/react-native-photo-view",
  },

then reinstall the app on your simulator react-native run-ios (or android)

good to go

@MaheshNandam
Copy link

MaheshNandam commented Jun 8, 2018

Solved By changing at RNPhotoView.m:

backgroundColor = [UIColor black] to backgroundColor = [UIColor clearColor];

@damrem
Copy link

damrem commented Aug 29, 2018

@esdrasetrenne 's solution works fine. I did this to "freeze" the version I depend on to today's master :

"react-native-photo-view": "github:alwx/react-native-photo-view#e28f541",

But it would be great to release today's master on npm!

@damrem
Copy link

damrem commented Aug 30, 2018

I did PR #172, for release purpose, I increased minor instead of patch because there were other changes since last npm release (1.5.2).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests