<?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 Ehioze Iweka on Medium]]></title>
        <description><![CDATA[Stories by Ehioze Iweka on Medium]]></description>
        <link>https://medium.com/@ehiozeiweka?source=rss-936c7ff8da6d------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*9LMZjyrh2lsZeFQRhMPwew.jpeg</url>
            <title>Stories by Ehioze Iweka on Medium</title>
            <link>https://medium.com/@ehiozeiweka?source=rss-936c7ff8da6d------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 01 Dec 2026 16:53:17 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ehiozeiweka/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[iOS UITableView Dynamic Height Sizing (UIKit)]]></title>
            <link>https://medium.com/@ehiozeiweka/ios-uitableview-dynamic-height-sizing-uikit-814e5c1fba9d?source=rss-936c7ff8da6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/814e5c1fba9d</guid>
            <category><![CDATA[uikit]]></category>
            <category><![CDATA[uitableview]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Ehioze Iweka]]></dc:creator>
            <pubDate>Tue, 27 May 2025 09:27:43 GMT</pubDate>
            <atom:updated>2025-05-27T09:27:43.258Z</atom:updated>
            <content:encoded><![CDATA[<p>iOS UITableView Dynamic Height Sizing (UIKit)</p><p>Hi there, This short article is intended to help iOS developers out there struggling with dynamic height for a UITableView.</p><p>I have always had the challenge of creating UITableViews whose height, i want to change dynamically as its content changes. I didn’t want to have empty cells in my tableview due to a reduced number of content.</p><p>I eventually figured out how to achieve this, so i have decided to share, just incase you are having such a challenge at the moment.</p><p>This solution only works for UIKit and not SwiftUI. The SwiftUI version will come up in my next story. Lets dive in.</p><p>Firstly you need to create your UITableView class as a subclass of UITableView. By doing this , you are inheriting all the properties of the UITableView class.</p><pre>class SelfSizedTableView: UITableView {<br>    var maxHeight: CGFloat = UIScreen.main.bounds.size.height * 0.85<br><br>    override var intrinsicContentSize: CGSize {<br>        let height = min(contentSize.height, maxHeight)<br>        return CGSize(width: contentSize.width, height: height)<br>    }<br><br>    override var contentSize: CGSize {<br>        didSet {<br>            self.invalidateIntrinsicContentSize()<br>        }<br>    }<br>}</pre><p>You can name your class any name of your choice. While the UITableView height is dynamic, you can define a maxHeight, such that once that maxHeight is attained, the tableview begins to scroll for added content, rather than increasing its height.</p><p>Next, you move over to your view where you would like to use a tableview, probably to display a short or long list of item. In your view, you can create your UITableView in this way:</p><pre>lazy var myTableView: SelfSizedTableView = {<br>        let view = SelfSizedTableView()<br>        view.showsVerticalScrollIndicator = false<br>        view.backgroundColor = .clear<br>        view.separatorStyle = .none<br>        view.register(MyTableViewCell.self, forCellReuseIdentifier: MyTableViewCell)<br>        return view<br>    }()</pre><p>You can then add your “myTableView” variable to your view as you would normally do, then add your view to your controller. I assume you already know how to do this.</p><p>Finally you need to add a UITableView delegate, in addition to other UITableView delegate you have already added, to your ViewController to help with the dynamic height.</p><pre>func tableView(_: UITableView, heightForRowAt _: IndexPath) -&gt; CGFloat {<br>        return UITableView.automaticDimension<br>    }</pre><p>With this added, you have a UITableView whose height increases / decreases as the content changes respectively. Let me know if you have any issues. You cn reach my via my bios below. Happy coding.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=814e5c1fba9d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[MICROSOFT AZURE APP SERVICE: MY PERSONAL EXPERIENCE]]></title>
            <link>https://medium.com/@ehiozeiweka/microsoft-azure-app-service-my-personal-experience-ca5ebbffb467?source=rss-936c7ff8da6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/ca5ebbffb467</guid>
            <dc:creator><![CDATA[Ehioze Iweka]]></dc:creator>
            <pubDate>Tue, 22 Apr 2025 11:05:19 GMT</pubDate>
            <atom:updated>2025-04-22T11:05:19.918Z</atom:updated>
            <content:encoded><![CDATA[<p>In the course of my journey in software development and management, I have had the opportunity to manage large scale enterprise application using different cloud infrastructure technologies (Microsoft Azure cloud service, Amazon Web Services (AWS)). Amongst the many available, I had first-hand experience working with Microsoft Azure Service, which I will refer to as <strong><em>Azure</em></strong> for the purpose of this write up. Today I will be writing on my experience, lessons I learnt and how best to set up your App service for proper and excellent scaling of your enterprise application. Let’s dive right in.</p><p><strong>AZURE APP SERVICE:<br> </strong>Applications hosted on Azure are generally hosted as app services. After a solution or an application has been developed in any language -particularly in C# — they are hosted on Azure using <strong>Azure App Service</strong>. As an infrastructure engineer, you are therefore expected to create an app service for your developers to deploy their applications to for it to be available for use. Creating an app service is very easy, just carefully follow the instructions presented to you by Azure, on your organization’s Azure Dashboard, and you have your app service. The task here is how to configure your app service in a good way so it can scale efficiently, effectively and fast as your applications is being used after deployment and go-live. You may also need to consider the cost implications as you set up this app service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*36byUvPOkLUlfLcKRnErZA.png" /><figcaption><em>Cross section of an Azure app service</em></figcaption></figure><p><strong>CONFIGURING YOUR AZURE APP SERVICE:</strong></p><p>Configuring your app service actually begins with selecting the proper app service plan that will suit it. This needs to be carefully selected based on the following:</p><p>1. <em>How large your application is or will be over time</em><br> 2<em>. The load that your application will be handling based on number of users, frequency of use, the number of API calls and database calls your application will be making per time, etc</em></p><p><em>3. The financial budget of your organization vis-a-vis the expected load it is expected to handle.</em></p><p>After putting all these together, you should then be able to decide on the app service plan to use based on your requirements above and the capacity of the different app service plan provided to you by azure when setting up your App Service from the azure portal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UJCLyXS3dHHb_rnbDPvhVA.png" /><figcaption><em>App service plans and their respective costing</em></figcaption></figure><p><strong>SCALING YOUR APP SERVICE PLAN:</strong></p><p>Azure also provides you with a way to scale your created and configures app service plan. However, scaling depends on the type of scale parameter selected and how the details of any selected scale parameter are specified In this section I will shed some insight on how to properly do this so as to make your application hosted by your configured app service, always available and scale efficiently and effectively. Scaling by Azure is done using <strong><em>Instance Count. </em></strong>There are two major ways this can be done: <br> <strong>1. Scaling to a specific instance count:</strong><br> In this case you are just specifying a constant instance count for your app service e.g., <strong><em>4 instance count</em></strong> or <strong><em>7 instance count</em></strong>. This type of scaling is fixed, meaning your app service scales up and down within this specific value you have selected.</p><p>This type of scaling will give you a fixed consumption cost as your app service will never scale beyond the specified instance count. The disadvantage of this however is that by the time your application increases in terms of load, and the load capacity of your application is greater than this specified instance count, your app service response time will increase tremendously making your application time out and as a result becomes inaccessible by the users of your app. You wouldn’t want your application users to be stuck with an application that drags and takes forever to load up or function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VC1p0KkQPoOGQaq0sngOQQ.png" /></figure><p>The image extract shows the specific instant count option highlighted in red. You can also generate as many scale conditions by selecting the “add scale condition button”. However, Azure will make use of the very most recently created scale condition to perform its scaling of your app service.</p><p><strong>2. Scale Based on a Metric:</strong></p><p>In this type of scaling, you would need to specify a metric, and azure will use that metric to scale up and scale down your app service based on request and load. When you are scaling, you are actually increasing and decreasing your instance count based on the metric you have selected and the number of requests your application is requesting from users. We will look at the best way to set a metric so as to ensure continuous availability of your application hosted by the app service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Q5A-brCHWLap6vUc6Vqozg.png" /></figure><p>We will look at each highlighted item and explain what it does. This will help you in determining how you want your scaling to work. Let’s get right in:<br> <em>1. Minimum, Maximum, and Default:</em></p><p>These are used to control the way Azure will use autoscale feature to auto scale your app service. <strong><em>Minimum</em></strong> is the minimum instance count autoscale will scale to when performing the automated scaling. If you specify a minimum of 4 for example, it means that while auto scale is scaling down your instance count, when it gets to a value of 4, the scale down will stop. <strong><em>Maximum</em></strong>, as the name implies is the maximum instance count that autoscale will scale up to while doing auto scaling. <strong><em>Default</em></strong> is the instance count value that auto scale will fall back to if it has difficulty reading or interpreting your scale out or scale in conditions set. So, take for instance you have specified your scale out / scale in conditions. If AutoScale has difficulty reading it, rather than cause a scaling problem, it will default to your Default scaling condition set.</p><p><em>2. Scale Out and Scale In</em>:<br> Scale out and Scale in are metric conditions such that when set, autoscale uses it to scale out or scale in your instance count. This is how Azure Autoscale does it auto scaling exactly. To set up Scale out or Scale in conditions, you need to consider the metrics as highlighted in the screen example above. To scale out, means to increase the instance count for every increase in load or request from your application. Scale In on the other hand means to decrease instant count due to a decrease in load or request from your application.To perform scale out or scale in, the following metrics needs to be set:</p><p><strong>a. Metric Name</strong>: Metric name speaks to the particular metric you<br> want autoscale to monitor and update based on conditions set. Some examples of metric name, includes Average CPU, Data Out, Data In, etc. You can select a particular metric mane from the drop down. I normally use Average CPU, as this is the metric that directly estimates the request load from my application.</p><p><strong>b. Operator: </strong>Operator actually determines if a condition is a scale out or scale in. Some common operators are greater than (&gt;), less than (&lt;), equals (=). When you specify greater than operator, you are automatically performing a scale up and vice-versa.</p><p><strong>c. Metric Threshold:</strong><br> The metric threshold is basically the trigger of the scale action. Irrespective of the scale type (Scale out or Scale In), the threshold is what triggers the scale action to occur and auto scale your app service. For example, if you specify a threshold of 50, and you selected a metric name of Average CPU and an operator of Greater than (&gt;). What you are telling Autoscale is this;<br> <strong><em>When the Average CPU of my app service is greater than 50, scale up my app service by a particular instance count.</em></strong></p><p><strong>d. Duration:</strong><br> Duration speaks to the time in history autoscale will look back to get performance statistics of your selected metrics. For example, if you selected a metric name of Average CPU, and a duration of 5 minutes, you are telling autoscale <strong><em>to get the average cpu of your app service in the last 5 minutes.</em></strong></p><p><strong>e. Time Grain Statistics:<br> </strong>This speaks to the particular time grain you want to be used in your statistical analysis of performance of your app service in the duration selected. There are different options like Average, Maximum, Minimum, Count, etc. If you select Maximum and you select a metric name of CPU percentage, and a duration of 5 minutes, you are telling autoscale to <strong><em>check for the MAXIMUM CPU Percentage of your app service in the last 5 minutes</em></strong></p><p><strong>f. Action:<br> </strong>Action speaks to the particular action you want auto scale to perform when it has satisfied all other metric condition you specified from a — e above. It does this using <strong><em>Operation</em>, Instance count, and cool down time. <em>Operation</em></strong> speaks to what autoscale should do, increase count or decrease count, increase percentage, decrease percentage, etc.</p><p><strong><em>Instance count</em></strong> allows you specify the number of instance count.<strong> cool down </strong>speaks to the time you want auto scale to cool down before performing another autoscale. If you specify a cool down of 5 minutes, you are saying that if auto scale just performed a scale, it should wait for another 5 minutes before it does another one.</p><p><strong>CONCLUSION</strong>:<br> I may not have touched every bit of autoscaling, but I believe that with the few write ups I have done, you can successfully auto scale your app service without having down times in your application. Feel free to contact me if you need further clarification. I am available via these channels:</p><p>Ehioze Iweka<br> <em>Email</em> <a href="/service/mailto:iehioze@gmail.com"><strong>iehioze@gmail.com</strong></a>, <br> <em>Twitter</em><strong><em> (ehis_iweka) <br> </em></strong><em>LinkedIn:</em><strong><em> </em></strong><a href="http://www.linkedin.com/in/ehiozeiweka."><strong><em>www.linkedin.com/in/ehiozeiweka.</em></strong></a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ca5ebbffb467" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Data Encryption in iOS using AES]]></title>
            <link>https://medium.com/@ehiozeiweka/data-encryption-in-ios-using-aes-7b295e168963?source=rss-936c7ff8da6d------2</link>
            <guid isPermaLink="false">https://medium.com/p/7b295e168963</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-development]]></category>
            <category><![CDATA[security]]></category>
            <category><![CDATA[data-security]]></category>
            <category><![CDATA[encryption]]></category>
            <dc:creator><![CDATA[Ehioze Iweka]]></dc:creator>
            <pubDate>Tue, 18 Sep 2018 14:16:32 GMT</pubDate>
            <atom:updated>2018-09-21T10:10:23.034Z</atom:updated>
            <content:encoded><![CDATA[<p>Data encryption is one of the ways of ensuring that data from your App is transported securely for processing via a service. I will be shedding a little light on data encryption using AES algorithm for anyone interested in encrypting data sent from their mobile application.</p><p><strong>What is AES Encryption</strong></p><p>The <strong>Advanced Encryption Standard</strong> (<strong>AES</strong>), also known by its original name <strong>Rijndael</strong>, is a specification for the encryption of electronic data established by the U.S. National Institute of Standards and Technology (NIST) in 2001.[4]. <a href="https://en.wikipedia.org/wiki/Advanced_Encryption_Standard"><strong><em>Read more here</em></strong></a>.</p><p><strong>How is AES Encryption Performed</strong></p><p>Performing AES encryption in iOS is quite straight forward depending on the the encryption mode. There are basically two modes: <strong><em>ECB (Electronic Code Block) </em></strong>and<strong><em> CBC (Cipher Block Chaining). </em></strong>The<strong><em> </em></strong>major difference is that the <strong>CBC</strong> makes use of an initialization vector while the <strong>ECB</strong> does not. To perform encryption in the CBC mode, the following are required:<br><strong>1. Secret Key: </strong>This is a randomly generated 16,24,or 32 digit key which must be used for both the encryption and decryption purposes. This key can be in base64 format or plain text depending on what’s best for you, but the rule is whatever format is used for encryption has to be the same format used for decryption, in other to get the same result.<br>2. <strong>Initialization Vector:</strong> This is a randomly generated 16 digit string, numeric or alphanumeric value used in the case of a CBC encryption<br>3.<strong>The text or data to be encrypted</strong>. As observed, the item for encryption can be a text string, a data or even an image data.</p><p>Assuming we already have our Secret Key defined in any format discussed above, lets proceed to generate our initialization vector. Below is a class method that randomly generates an initialization vector, of any specified length, and returns the result as a base64 encoded string.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/723/1*oDB0GlTAsEUNItAct2faUA.png" /><figcaption>Initialization vector generation</figcaption></figure><p>with the generated Initialization Vector(IV) and Secret Key you can now AES encrypt and decrypt your data int the following ways:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*zxI0efXDjz5G-dTCMI36Xw.png" /><figcaption>encrypting and decrypting method</figcaption></figure><p>You will need to add the <a href="https://github.com/AlanQuatermain/aqtoolkit/tree/master/CommonCrypto"><strong>AQToolKit</strong></a> third party library to your project, which is where the encryption algorithm is written, to avoid errors when you build your project.</p><p>Finally you have to implement the <strong><em>getKey</em></strong> and <strong><em>getIV</em></strong> methods used in your encrypt and decrypt method above. These methods just ensures that your IV and KEY are sent to the encryption method as a Data and not String. I have added the snippets below too:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/732/1*cKOXm3Qx01h3h0jwENLGKA.png" /></figure><p>You can convert your encrypted or decrypted data to base64 format using this code snippet:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*oRdHDdqZ3ui8Qf34HKTn-g.png" /></figure><p>where <strong><em>encrypted </em></strong>is the result from your encryption by the encrypt method above.</p><p><strong>CONCLUSION<br></strong>Data encryption using AES algorithm is very easy to implement if only the rules are followed when doing it. I hope this helps someone out there. Feel free to drop comments, and get across to me, for further clarification or assistance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7b295e168963" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>