• Stars
    star
    1,063
  • Rank 43,433 (Top 0.9 %)
  • Language
    Objective-C
  • License
    MIT License
  • Created almost 11 years ago
  • Updated about 4 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

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.

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

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.

More Repositories

1

EXPhotoViewer

A drop-in full screen photo viewer for iOS with zoom, SUPER easy to use, JUST ONE LINE OF CODE. It has the "zoom the rest of the app away effect" It works with any UIImageView, just laying around, in a table, in a cell in a custom made carousel, everywhere! Whats the "EX" for? it is for **EX**TRA AWESOME!!!
Objective-C
221
star
2

SpringyFlowLayoutExample

Implementation of the SpringyFlowLayout as seen on the WWDC 2013 session 217
Objective-C
16
star
3

DEVJACAutoBalancedLabel

Dead simple Objective-C UILabel subclass that balance text horizontally across several lines so all the lines have similar length and you don't end with a screen wide UILabel where the last line has only 1 word
Objective-C
11
star
4

JACProgressLabel

A Simple progress bar that shows a text that changes color reflecting the progress.
10
star
5

iOS-ImageManager

An objective-c (iOS SDK iPhone/iPad/iPod Touch) Library than manage the download and local cache storage of images with an easily extendable objects for special needs. Ideal for avatars or remote images. It automatically keeps the app footprint low and deletes old images to reduce hard drive usage.
Objective-C
10
star
6

UILabel-BackgroundAware

A UILabel category that adds a method for a UILabel to change it textColor to black or white regarding whats behind it, for example if you a have a really bright image behind it will change to black.
7
star
7

peekMyApps

I was curious about all this "twitter is spying my apps" thing so I got my hands on what apparently is the scheme list used by twitter to scan you your device and wrote this very small app that list the apps it detects on your device in less than 1 hour, so you can expect ugly code.
Objective-C
6
star
8

Dev_Jac-AnimatedImages

Simple category to load animated image files into an UIImageView. This category supports GIF and APNGs (Animated PNG)
Objective-C
5
star
9

tryswiftnycAccessibilityDemo

This is the demo app I showed on Try! Swift NYC 2017. It is a simple demo app without any consideration about Accessibility but there is a PR that fixes that. The idea is that you can see the PR and notice that with very little effort you can enable all your flows to users who rely on VoiceOver.
2
star
10

iOS-performeSelector_-_swizzleMethod

I explore the use of swizzleMethod in order to add a new "cancelPreviousPerformRequestsWithSelector" that only requires the selector as a parameter and it will cancel ALL of the performRequest no matter the target nor the arguments. In order words you don't need a pointer to the targets anymore.
Objective-C
2
star
11

Chain-Of-Delegates

This object is intended to fix the problem when you need several delegates from the same object or for when you want to "delegate" some delegate methods in one object and some on other.
Objective-C
1
star
12

BlurAnnihilation

A practical demostration of a bug found on the current (beta 5 iOS8) implementation of UIVisualEffectView + UIBlurEffect
Objective-C
1
star
13

TSW-W1

Workshop for Try Swift World
Swift
1
star