Please carefully read this guide in order to fully configure this template, and remember to test it on a Real Device – the Emulator may fail.
This template has native Apple Swift code, so you can edit it only with Xcode running on a Mac computer. If you don’t have it, download it for free on the Mac App Store.
Info.plist
file – you can find it in the files list on the left-side panel – and set the text you wish in the Value
column of the Privacy rows.Main.storyboard
and you can find it in the list of file that is shown in left-side panel of the Xcode window.Assets.xcassets
folder.
let APP_NAME = "Filtr"
let ADMOB_INTERSTITIAL_UNIT_ID = "ca-app-pub-3940256099942544/1033173712"
You also have to replace the string into Info.plist
with your own App ID:#
symbol. The main color of the app and some UI will be affected by your change:
let MAIN_COLOR = hexValue(hex: "#252525")
.ttf
or .otf
font file into the left-side panel in Xcode and click the Finish button in the popup that will show up: let APP_STORE_LINK = "http://itunes.apple.com/app/idXXXXXXXXX"
You can grab the App ID of your app in the App Information section in the App Store Connect page of your app.
let enhanceFilters = [
"NoFilter-No Filter",
"CIPhotoEffectInstant-Nereid",
"CIPhotoEffectProcess-Celestia",
"CIPhotoEffectTransfer-Hone",
"CISepiaTone-Siren",
"CIPhotoEffectChrome-Arener",
"CIPhotoEffectFade-Seahag",
]
let blackWhiteFilters = [
"NoFilter-No Filter",
"CIPhotoEffectTonal-Tirohen",
"CIPhotoEffectNoir-Lampey",
"CIMaximumComponent-Donjon",
"CIMinimumComponent-Cracot",
"CIDotScreen-Wafeld",
]
let luminanceFilters = [
"NoFilter-No Filter",
"CIColorInvert-Falkon",
"CIColorPosterize-Marlin",
"CISharpenLuminance-Lumino",
"CIVignette-Utopya",
"CIExposureAdjust-Triton",
"CIExposureAdjust-Mopool",
"CIGammaAdjust-Shoalb",
"CIGammaAdjust-Haro",
]
let colorFilters = [
"NoFilter-No Filter",
"CIColorMonochrome-Beada",
"CIColorMonochrome-Arcadin",
"CIColorMonochrome-Windul",
"CIColorMonochrome-Nemehia",
"CIColorMonochrome-Bane",
"CIColorMonochrome-Bifar",
"CIFalseColor-Rotard",
"CIFalseColor-Feeny",
"CIFalseColor-Flamy",
]
let hueFilters = [
"NoFilter-No Filter",
"CIHueAdjust-Avaroce",
"CIHueAdjust-Dalphyn",
"CIHueAdjust-Crimson",
"CIHueAdjust-Lorem",
"CIHueAdjust-Erham",
]
let specialFilters = [
"NoFilter-No Filter",
"CIPixellate-Earagh",
"CIGaussianBlur-Halberd",
"CIGlassDistortion-Madan",
"CICMYKHalftone-Bretos",
"CICrystallize-Annow",
"CIEdges-Stinlay",
"CIEdgeWork-Iculn",
"CIShadedMaterial-Merhoyd",
"CILineOverlay-Nula",
"CIPointillize-Mantal",
]
You can add new photo filter arrays if you want. In this case, I strongly suggest you to first get familiar with Core Image Effects from the Core Image Filter Reference Documentation.specialFilters
one:
let awesomeFilters = [
"NoFilter-No Filter", <-- THIS ITEM MUST ALWAYS BE PRESENT AS FIRST ELEMENT!
"CIColorMonochrome-Name1",
"CIPhotoEffectProcess-Name2",
"CIPhotoEffectTransfer-Name3",
]
As you may notice, the items of that array contain a first item that’s always called "NoFilter-No Filter". This item must always be present in the first position of each array – check out the existing arrays to see it."CIColorMonochrome-Name1"
, where CIPhotoEffectInstant is the Core Image filter name, and Name1 is your custom name.selectedFiltersList
statement, add your new case like this:
case 6:
filtersArray = awesomeFilters
titleLabel.text = "Awesome" <-- NAME OF YOUR FILTERS SET, SHOWN IN THE APP
break
IMPORTANT: Make sure to update the existing case 6
into case 7
, since that case must always be the last one, because it shows the Filters you’ve saved in your personal Collection:
// • YOUR FILTERS COLLECTION •
case 7: <-- CHANGED 6 INTO 7, SO IT'S ALWAYS THE LAST 'case'
filtersArray = yourFiltersCollection
filtersArray.insert(enhanceFilters[0], at: 0)
titleLabel.text = "Filters Collection"
break
filtersArray[i]
statement. You can see that it contains several cases with the full names of the filters, for instance "CIColorMonochrome-Beada"
. case "CIColorMonochrome-Name1":
let color = hexValue(hex: "#12A5B2")
filter!.setValue(CIColor(color: color), forKey: kCIInputColorKey)
filter!.setValue(0.5, forKey: kCIInputIntensityKey)
break
awesomeFilters
array. // MARK: - TABLES & COLUMNS NAMES
fireInterstitialAd;
Xcode will show you a list of Swift files where such code is located.