<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Sherary Apriliana on Medium]]></title>
        <description><![CDATA[Stories by Sherary Apriliana on Medium]]></description>
        <link>https://medium.com/@sherary?source=rss-a8dd5b29c0eb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*VMmHrcidbQWOnGJKGDBpSw.png</url>
            <title>Stories by Sherary Apriliana on Medium</title>
            <link>https://medium.com/@sherary?source=rss-a8dd5b29c0eb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 22:34:35 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@sherary/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Reusable Custom Checkbox with Title Using UIKit Programmatically]]></title>
            <link>https://medium.com/@sherary/reusable-custom-checkbox-with-title-using-uikit-programmatically-619a5084ef1f?source=rss-a8dd5b29c0eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/619a5084ef1f</guid>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Sherary Apriliana]]></dc:creator>
            <pubDate>Tue, 29 Nov 2022 17:32:20 GMT</pubDate>
            <atom:updated>2022-11-30T05:28:39.827Z</atom:updated>
            <content:encoded><![CDATA[<p>Since the last project I’ve been working on started, I’ve been looking up a tutorial on how to make a checkbox with a title. However, the results coming out are always the ones with the checkbox on the left side. So, I made a custom checkbox with the title on the left and the checkbox on the right side.</p><p>First, we make a new project with Storyboard, but we’re going to delete it later. Then, add a new Cocoa Touch Class file and name it CheckboxWithTitle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dJcb1Wwdcfki3RwGw2OkAQ.png" /></figure><p>Then, we proceed to delete our Main.storyboard file because we don’t need it. But we also need to remove several lines from our info.plist file.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FhDjQgTrPJ86CG6s7Mb34w.png" /><figcaption>Remove this line</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BrYddFVBA18uI-k31WlgGg.png" /><figcaption>Also, remove this line.</figcaption></figure><p>After that, we need to add these lines in AppDelegate:</p><pre>var window: UIWindow?<br><br>func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -&gt; Bool {<br>    window = UIWindow(frame: UIScreen.main.bounds)<br>    window?.makeKeyAndVisible()<br>    window?.rootViewController = ViewController()<br><br>    return true<br>}</pre><p>Then on SceneDelegate, we also need to adjust few lines:</p><pre>var window: UIWindow?<br><br>func scene(_ scene: UIScene, willConnectTo session: UISceneSession, options connectionOptions: UIScene.ConnectionOptions) {<br>    guard let windowScene = (scene as? UIWindowScene) else { return }<br>    let window = UIWindow(windowScene: windowScene)<br>    self.window = window<br>    window.rootViewController = ViewController()<br>    window.makeKeyAndVisible()<br>}</pre><p>Let&#39;s go through our new file CheckboxWithTitle. For the sake of simplicity, we will use SnapKit for the layout, though without it we will do just fine.</p><p>Since we need text and an image, we need to declare the view.</p><pre>class CheckboxWithTitle: UIView {<br>    var isChecked = false<br>    let checkbox = UIImageView()<br>    let label = UILabel()<br><br>    override init(frame: CGRect) {<br>        super.init(frame: frame)<br>    }<br>    <br>    init (text: String) {<br>        super.init(frame: .zero)<br>    }<br>    <br>    required init?(coder: NSCoder) {<br>        super.init(coder: coder)<br>    }<br>}</pre><p>After that, we create a function called createSubViews that receive “text” as String parameter. Inside this function, we add UI styling for the label we declared earlier and set the default image for the checkbox.</p><pre>private func createSubViews(text: String) {<br>    label.textColor = .black<br>    label.translatesAutoresizingMaskIntoConstraints = false<br>    label.numberOfLines = 0<br>    label.text = text<br>    label.textAlignment = .left<br>        <br>    addSubview(label)<br>    label.snp.makeConstraints { make in<br>        make.left.equalToSuperview().offset(20)<br>    }<br>        <br>    checkbox.image = UIImage(systemName: &quot;square&quot;)<br>    checkbox.contentMode = .scaleAspectFit<br>    checkbox.tintColor = UIColor(named: &quot;Black&quot;)<br>        <br>    addSubview(checkbox)<br>    checkbox.snp.makeConstraints { make in<br>        make.right.equalToSuperview().offset(-20)<br>    }<br>}</pre><p>Let&#39;s head back to our ViewController and add our custom component to our main view.</p><pre>import UIKit<br><br>class ViewController: UIViewController {<br><br>    private lazy var checkbox: CheckboxWithTitle = {<br>        let checkbox = CheckboxWithTitle(text: &quot;Check Me!&quot;)<br>        <br>        return checkbox<br>    }()<br>    <br>    override func viewDidLoad() {<br>        super.viewDidLoad()<br>    }<br>}</pre><p>Then, we add setLayouts function to put our UI styling.</p><pre>override func viewDidLoad() {<br>    super.viewDidLoad()<br><br>    setLayouts()<br>}<br><br>private func setLayouts() {<br>    view.backgroundColor = .white<br>    view.addSubview(checkbox)<br>    checkbox.snp.makeConstraints { make in<br>        make.width.equalToSuperview()<br>        make.height.equalTo(20)<br>        make.centerX.equalToSuperview()<br>        make.centerY.equalToSuperview()<br>    }<br>}</pre><p>We need to add gesture recognizer in order to make it interactive. Therefore, we have to add a gesture recognizer and connect it with our UI and the integration function.</p><pre>private func integrateTapGestures() {<br>    let gesture = UITapGestureRecognizer(target: self, action: #selector(didTapCheckboxWithTitle))<br>    checkbox.addGestureRecognizer(gesture)<br>}<br><br>@objc private func didTapCheckboxWithTitle() {<br>    print(&quot;checkbox tapped&quot;)<br>}</pre><p>In this state, our checkbox looks like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/966/1*UmOVPfMYAqlbPSns_61XyA.png" /></figure><p>Though, to make it interactive we need to change a few things. Back to our CheckboxWithTitle file, to make our checkbox checked, we have to make it change views every time we clicked the box. So, we add a new function called ‘toggle’ to switch our box to checked and unchecked.</p><pre>public func toggle() {<br>    self.isChecked = !isChecked<br>        <br>    if !isChecked {<br>        checkbox.image = UIImage(systemName: &quot;checkmark.square.fill&quot;)<br>    } else {<br>        checkbox.image = UIImage(systemName: &quot;square&quot;)<br>    }<br>}</pre><p>We set it to “public”, so we can call it to our ViewController. And in our ViewController, we add the toggle.</p><pre>@objc private func didTapCheckboxWithTitle() {<br>    checkbox.toggle()<br>        <br>    if checkbox.isChecked == true {<br>        //your code goes here<br>    } else {<br>        //your code goes here<br>    }<br>}</pre><p>Here is the final result of our code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*UysXeOWRkVWMaApKVGQneQ.gif" /></figure><p>The source code will be available here:</p><p><a href="https://github.com/sherary/checkbox-with-title">https://github.com/sherary/checkbox-with-title</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=619a5084ef1f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gamification for Enhancing Resilience]]></title>
            <link>https://medium.com/@sherary/gamification-for-enhancing-resilience-8a9a1af1d82c?source=rss-a8dd5b29c0eb------2</link>
            <guid isPermaLink="false">https://medium.com/p/8a9a1af1d82c</guid>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[gamification]]></category>
            <category><![CDATA[mobile-ui-design]]></category>
            <category><![CDATA[swiftui]]></category>
            <category><![CDATA[ui-design]]></category>
            <dc:creator><![CDATA[Sherary Apriliana]]></dc:creator>
            <pubDate>Fri, 05 Aug 2022 04:32:34 GMT</pubDate>
            <atom:updated>2022-08-05T04:32:34.413Z</atom:updated>
            <content:encoded><![CDATA[<p>Hello! My name is Sherary, and I’m about to share my experience of my coding days in Swift. By coding, I mean generating a series of bugs on my account. Well, well, well, if it isn’t the consequences of my actions.</p><p>Lately, I was experimenting with SwiftUI and amazed at how powerful it is with its flexibility. So I decided to implement what I’ve learned on an app that has personal value to me.</p><p>Everyone with a big dream wants to achieve maximum productivity. All day, we want to optimize the time we have to do as much as we can. Though, sometimes we were hit with something that is coming within ourselves. Emotions.</p><p>Though most of the time, our emotions do come a lot towards us. It makes us wonder if we ever deserve anything good that came on our behalf. Even if the answer is a certain “YES” our mind says “NO, you can’t do this. This is out of our league”. That’s Imposter Syndrome.</p><p>Imposter Syndrome&#39;s root is perfectionism. By assessing and re-assessing how we achieve success, dismissing our own contributions, berating our own performance, a feeling that we’re a disappointment, and setting unrealistic goals which lead to procrastination and self-sabotaging.</p><p>According to <a href="https://www.apa.org/monitor/2021/06/cover-impostor-phenomenon">this</a> article by American Psychological Association (APA), combating Imposter Syndrome takes several steps that we need to pay attention to.</p><ol><li><strong>We need to let perfectionism go. </strong>— Good things take time to work, it doesn’t come overnight.</li><li><strong>Celebrate wins and failures. — </strong>Whether you succeed or failed, it is part of the process of becoming the best version of yourself.</li><li><strong>Be mindful of your progress. — </strong>Focusing on the outcome all the time will hurt your mental health. You need to enjoy the process to produce a better outcome.</li></ol><p>Thus, I got inspired to gamify a to-do-list app that I called ResiliQuest. It is an app that (I hope) will help anyone who feels like you have been drawn back by Imposter Syndrome. It supposes to support you through the day to getting back up after your fall.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*bK9Kaa_wDZNm9OcGaeYM8A.png" /><figcaption>Landing view</figcaption></figure><p>The key feature of this app is to set yourself a challenge. The biggest one you want to beat just like how you want to overturn the Evil Kingdom in the final scene. You set your own goals, which is your own final boss.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*sQ_kQpcF6_mvb9qzMREbwQ.png" /></figure><p>You cannot go on your own unarmed. Therefore, you need to train yourself. But before you can get to the grinding part, you need to set your character. Aligning with our initial purpose, to combat Imposter Syndrome, we need to know ourselves, to be authentic, to know our qualities and shortcomings. So, in the onboarding scene, before you depart, you need to set your own status. After that, you can go on and set your own quest. You can make it a repeating quest, occasional, every certain day, annual, and so on as you like.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*WrBqC6dk29AC9SzpYZjHqw.png" /><figcaption>Spend your points to your status</figcaption></figure><p>When you have done your quest, the app will reward you with some status points. Later you can see in the status bar how many points you obtain from the quest earlier and you can gain a status along with the level you’ve set. Then, after quite some time, the app will make a comparison between the new you vs the old you. Pretty much fun, huh?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/390/1*qLkYKTjet8COVkfQh64O0g.png" /></figure><p>After spending a week on the concept, design prototypes, and development, there are a few things I learned about gamification. <a href="https://morphos.is/blog/gamification-make-your-boring-app-fun">Here</a> is the link to an article that I use as a guide. Though there are a lot of key points that I need to take more attention to, here are some that I learn the most:</p><ol><li><strong>Goals.</strong> — What would be a game without a goal if it is not a game at all? The goal we set in this app will be to determine what we will receive as gratification later.</li><li><strong>Rules. </strong>— No game is a game without a rule. The rule of this app are no procrastination, no fabricating the records, and no multitasking. Without rules, the game wouldn’t be fun!</li><li><strong>Rewards.</strong> — We would not be going for long if we don’t know what we were doing. Related to the goal we’ve set in the first place and the rules, we need to get a reward for something we do well. Considering our mission is to combat Imposter Syndrome, we need to be more mindful of our progress. Therefore, inactivity will result in a status point reduction, and success will increase it.</li></ol><p>Here is the <a href="https://www.figma.com/file/1OTxWmtYOf1xV3pysDpBhQ/NC2--Resiliquest?node-id=0%3A1">design prototype </a>for the app. The application itself is still in development. I realized that I need to add more graphics in order to make it more interesting, though I would be glad if anyone wants to collaborate with me! If you are interested or wanted to give some feedback please leave a comment!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8a9a1af1d82c" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>