[TIMOB-2409] iOS: Expose method to set UIViewContentModes on views
GitHub Issue | n/a |
---|---|
Type | New Feature |
Priority | Low |
Status | Open |
Resolution | Unresolved |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | iOS |
Labels | core, parity |
Reporter | Guilherme Chapiewski |
Assignee | Unknown |
Created | 2011-04-15T03:18:55.000+0000 |
Updated | 2020-08-23T17:22:04.000+0000 |
Description
It should be possible to set ContentModes (http://developer.apple.com/library/ios/#documentation/UIKit/Reference/UIView_Class/UIView/UIView.html> on UIViews and ImageViews.Comments
- Stephen Tramer 2011-04-15 Possibly something to discuss about layout. Should be handled by 'auto'?
- Junaid Younus 2012-08-23 Marked as a feature request instead of bug.
- me@gmail.com 2014-08-26 This feature is something that is honestly very basic, esp when it comes to imageViews. It would be great to not need to add the overhead to my app of multiple imagviews in order to clip images to fit a given size without stretching and distortion. This should be an API ticket though to also implement http://developer.android.com/reference/android/widget/ImageView.ScaleType.html for android image views I would be happy to do a PR if we can agree on an API for this.
- Ingo Muschenetz 2014-08-26 [~mattapperson] Thank you. If you'd like to propose an API, I can bring it up for discussion.
- me@gmail.com 2014-08-26 I think for API parity, we should keep the API on the ImageView where it is (IMHO at least) the most needed. I think it should be done via a property of scaleType, with values being constants. The constants I would think should be: CENTER, CENTER_CROP, CENTER_INSIDE, FIT_CENTER, FIT_XY With iOS also having: TOP_LEFT TOP_RIGHT BOTTOM_LEFT BOTTOM_RIGHT LEFT RIGHT TOP BOTTOM Think that should cover it... dont think I missed anything...
- Fokke Zandbergen 2015-06-01 For iOS there's a module that implements these: https://github.com/pegli/TiUIEx/blob/master/mobile/iphone/documentation/index.md#imageview This would be a really welcome feature.
- Fokke Zandbergen 2015-11-09 It would be good to do the for Android as well: http://developer.android.com/reference/android/widget/ImageView.ScaleType.html I'm sure there's something like this for Windows as wel
- Mads Moller 2015-11-10 I have support for all ContentModes on iOS in my module here: https://github.com/viezel/NappImageView/blob/master/iphone/Classes/DkNappImageviewModule.m#L83-L95 You are free to implement this in the SDK.
- Mads Moller 2015-11-10 I see mpociot did a fork of my module and started on an android version: https://github.com/mpociot/NappImageView/commit/cc1235b77df327bf984cbc6b65b1f1e4190c4f87
- Jong Eun Lee 2016-03-02 I thought that this is very important feature like a requirement. I'm hoping that next version of titanium SDK has this feature for iOS and Android.
- Ygor Lemos 2020-08-23 Andrea Vitale has a nice module for this, but it would be awesome to have this in native Ti ImageViews for both iOS and Android. https://github.com/AndreaVitale/av.imageview