Skip to content
المشاريع

Julioacarrettoni/UIImageView_FaceAwareFill

عرض على GitHub

حول

This category applies Aspect Fill content mode to an image and if faces are detected it centers them instead of centering the image just by its geometrical center.

التصميم والوسائط

كيف تُقاس هذه الأرقام

النمو المقاس للنجوم

خلال 24 ساعة
٠
خلال 7 أيام
٠
خلال 15 يومًا
٠
خلال شهر
٠

تغيّر صافي النجوم خلال فترات متداخلة، وليس مجموعًا يوميًا. تبقى القياسات المفقودة فارغة. النجوم تقيس الاهتمام لا جودة البرمجيات.

README.md

الأصل

FaceAwareFill

Version Platform

This category applies Aspect Fill content mode to an image and if faces are detected it centers them instead of centering the image just by its geometrical center.

Based on this awesome post by @maniacdev

Example:

image

Installation

FaceAwareFill is available through CocoaPods, to install it simply add the following line to your Podfile:

pod "FaceAwareFill"

Usage

Import the category to your .m file or to your "prefix" file.

#import "UIImageView+UIImageView_FaceAwareFill.h"

Then AFTER setting the image property of a UIImageView do:

[imageView faceAwareFill];

That's all.

Enjoy!

Debugging

A red rectangle can optionally be displayed on faces for debugging.

To enable, add the following value to the preprocessor macros:

DEBUGGING_FACE_AWARE_FILL

Author

Julio Andrés Carretttoni, @dev_jac

Notes:

License

FaceAwareFill is available under the MIT license. See the LICENSE file for more info.

استكشف مشاريع مشابهة ومرتبطة

جارٍ التحميل…