-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Behavioral changes for FBProfilePictureView control
Summary: This is in advance of doing the changes for #1113853 about providing a high res square picture for FBProfilePictureView. Our Profile Picture view control is messed up in a few ways: * It is always resizing the profile picture to fit the available view. In the case of profile pictures, this is almost always wrong due to what it does to image quality. * It is conflating image size, with "cropping" (square, original). * It isn't taking advantage of the fact that we can know the right image size to load, and placing that burden on the developer. Thus, a few changes here: * As soon as we know the image dimensions, we set the contentMode to ensure the image is never larger than its native size, and that it's never cropped by the view. * We choose the right image variant to display based upon view size. * We have a new enum for the "cropping" * We entirely remove the "size" enumeration. It's not useful for the developer to specify this. As such, this control is a lot easier to reason about. This will also extend well when we have multiple sizes of square images. This change also adds a bunch of UI control to PictureProfileSample for playing with this. And updating other controls that were setting the size param. Test Plan: Scrumptious, SwitchUser, MyProfile, and ProfilePictureSample - both iPad and iPhone. Reviewers: clang, jacl, mmarucheck Reviewed By: clang CC: msdkexp@ Differential Revision: https://phabricator.fb.com/D491131 Task ID: 1113853
- Loading branch information
1 parent
33f7e8e
commit b67aec4
Showing
10 changed files
with
595 additions
and
283 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.