<?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 Elsayed Hussein on Medium]]></title>
        <description><![CDATA[Stories by Elsayed Hussein on Medium]]></description>
        <link>https://medium.com/@bokhary?source=rss-c54fb5d20eba------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*gv-ztRqtQVfAr3U4ZbRFJQ.jpeg</url>
            <title>Stories by Elsayed Hussein on Medium</title>
            <link>https://medium.com/@bokhary?source=rss-c54fb5d20eba------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 27 Nov 2026 22:02:43 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bokhary/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[Streamlining Real-Time Event Notifications with WebhookBeam]]></title>
            <link>https://medium.com/@bokhary/streamlining-real-time-event-notifications-with-webhookbeam-616c67ff84db?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/616c67ff84db</guid>
            <category><![CDATA[webhook-integration]]></category>
            <category><![CDATA[discord]]></category>
            <category><![CDATA[mailchimp]]></category>
            <category><![CDATA[paypal]]></category>
            <category><![CDATA[webhooks]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Thu, 04 Jan 2024 20:10:13 GMT</pubDate>
            <atom:updated>2024-01-04T20:12:37.247Z</atom:updated>
            <content:encoded><![CDATA[<p>In the dynamic realm of app development, services like PayPal, Shopify, Stripe, and others support webhooks for real-time event transmission. To streamline this process, we introduce <a href="https://webhookbeam.com/"><strong>WebhookBeam</strong></a>. With <a href="https://webhookbeam.com/documentation/create-your-first-webhook-url/"><strong>WebhookBeam</strong></a>, easily generate a webhook URL and integrate it seamlessly with various services. Receive instant push notifications on the <a href="https://apps.apple.com/us/app/webhookbeam-track-webhooks/id6459449576"><strong>WebhookBeam mobile app</strong></a> whenever an event occurs, enhancing your ability to stay informed and responsive in real time. Revolutionize your connection with applications using <a href="https://webhookbeam.com/documentation/create-your-first-webhook-url/"><strong>WebhookBeam</strong></a>, a concise solution for managing webhooks across diverse services.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BMrbXuTgzdqwD3GOxCVbQA.png" /></figure><p>You can check the <a href="https://webhookbeam.com/documentation/create-your-first-webhook-url/"><strong>documentation</strong></a> to learn how to create webhooks on <a href="https://webhookbeam.com/documentation/create-your-first-webhook-url/"><strong>WebhookBeam</strong></a> and integrate them for your services.</p><p><a href="https://webhookbeam.com/documentation/create-your-first-webhook-url/"><strong>WebhookBeam</strong></a> in action</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FzPbZovsZP5A%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DzPbZovsZP5A&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FzPbZovsZP5A%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c88a342bafa62b4632c1d5163a76e741/href">https://medium.com/media/c88a342bafa62b4632c1d5163a76e741/href</a></iframe><p>If you have any questions or suggestions, please contact us at info@webhookbeam.com. Thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=616c67ff84db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Show loading on UIAlertController]]></title>
            <link>https://medium.com/@bokhary/show-loading-on-uialertcontroller-d8227c7b7d86?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8227c7b7d86</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Tue, 22 Aug 2023 07:50:12 GMT</pubDate>
            <atom:updated>2023-08-22T07:50:12.331Z</atom:updated>
            <content:encoded><![CDATA[<p>I enjoy the smooth loading experience of the App Store Connect app when releasing a new version of an app. This positive experience inspired me to create something similar.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EbYrj6_mGTV0dRpwjorYzw.png" /></figure><p>I did some research to figure it out, and here are the steps I found.</p><h4>Steps:</h4><h3>1. Initially, you should locate the view that contains the alert action you intend to replace</h3><blockquote>To achieve this, I utilized the <strong>Debug View Hierarchy</strong> in Xcode. Through this process, I observed that <strong>UIAlertController</strong> actions were grouped within a <strong>UIStackView</strong>. This observation became my starting point.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1014/1*CM2c4zCBW7sCYPl547YfkQ.png" /><figcaption><strong>Debug View Hierarchy</strong></figcaption></figure><p>I made the decision to explore all the subviews within the UIAlertController’s view, aiming to locate both the stack view and the desired alert action view.</p><h4>visitAllViews function</h4><pre>    private static func visitAllViews(in view: UIView) {<br>        for subview in view.subviews {<br>            if let stackView = subview as? UIStackView {<br>                self.stackView = stackView<br>                for subStackView in stackView.arrangedSubviews {<br>                    if isLoadingActionView(subStackView) {<br>                        viewToRemove = subStackView<br>                        let gestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(loadingAction(sender:)))<br>                        gestureRecognizer.minimumPressDuration = 0.0<br>                        // if alert was presenting in scroll view, gesture will not work until set this delegate<br>                        gestureRecognizer.delegate = viewController as? UIGestureRecognizerDelegate<br>                        subStackView.addGestureRecognizer(gestureRecognizer)<br>                    }<br>                }<br>            } else {<br>                // Recursively visit subviews of the current subview<br>                visitAllViews(in: subview)<br>            }<br>        }<br>    }</pre><h3>2. locate the UIAlertAction view</h3><blockquote>In the <strong>visitAllViews</strong> function, you’ll come across <strong>isLoadingActionView</strong>. This function helps identify the specific view we intend to substitute with the loading view.alert</blockquote><h4>isLoadingActionView function</h4><pre>    private static func isLoadingActionView(_ view: UIView) -&gt; Bool {<br>        for subview in view.subviews {<br>            if let label = subview as? UILabel, label.text == self.okTitle {<br>                return true<br>            }<br>            return isLoadingActionView(subview)<br>        }<br>        return false<br>    }</pre><h3>3. Preventing UIAlertController from dismissing</h3><p>As you’re aware, when clicking on an alert action, the <strong>UIAlertController</strong> gets dismissed. However, if you wish to prevent this behavior, there’s a workaround available: you can achieve this by disabling the alert action. To accomplish that, you’ll need to set up a <strong>UILongPressGestureRecognizer</strong> for the alert action view, with the <strong>minimumPressDuration</strong> set to 0.</p><p><strong>UILongPressGestureRecognizer</strong></p><pre>viewToRemove = subStackView<br>let gestureRecognizer = UILongPressGestureRecognizer(target: self, action: #selector(loadingAction(sender:)))<br>gestureRecognizer.minimumPressDuration = 0.0<br>// if alert was presenting in scroll view, gesture will not work until set this delegate<br>gestureRecognizer.delegate = viewController as? UIGestureRecognizerDelegate<br>subStackView.addGestureRecognizer(gestureRecognizer)</pre><blockquote>When presenting a UIAlertController within a scroll view, it’s important to set the <strong>gestureRecognizer.delegate</strong> property and implement the <strong>shouldRecognizeSimultaneouslyWith</strong> method of the <strong>UIGestureRecognizerDelegate</strong> protocol.</blockquote><pre>extension ViewController: UIGestureRecognizerDelegate {<br><br>    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldRecognizeSimultaneouslyWith otherGestureRecognizer: UIGestureRecognizer) -&gt; Bool {<br>        return true<br>    }<br>}</pre><h4>loadingAction(sender: UILongPressGestureRecognizer)</h4><pre>    @objc static func loadingAction(sender: UILongPressGestureRecognizer) {<br>        switch sender.state {<br>        case .began:<br>            loadingAction?.isEnabled = false<br>            startLoading()<br>            alertClosure?(alert)<br>        default:<br>            return<br>        }<br>    }</pre><blockquote>Take a look at this StackOverflow answer for a more detailed explanation of the workaround</blockquote><p><a href="https://stackoverflow.com/a/28956529/5251783">Prevent UIAlertController to dismiss</a></p><h3>4. Add loading</h3><p>As you see in <strong>loadingAction</strong> we call <strong>startLoading </strong>function</p><h4>startLoading function</h4><pre>    private static func startLoading() {<br>        let constraint = viewToRemove?.constraints.first(where:  { $0.firstAttribute == .width })<br>        if let viewToRemove = viewToRemove {<br>            stackView?.removeArrangedSubview(viewToRemove)<br>            viewToRemove.removeFromSuperview()<br>        }<br>        let indicator = UIActivityIndicatorView(style: .medium)<br>        indicator.translatesAutoresizingMaskIntoConstraints = false<br>        indicator.widthAnchor.constraint(equalToConstant: constraint?.constant ?? 0).isActive = true<br>        indicator.color = .lightGray<br>        indicator.startAnimating()<br>        stackView?.addArrangedSubview(indicator)<br>    }</pre><p>I created a straightforward <strong>Utils</strong> class for convenient usage, like this:</p><pre>        Utils.alert(&quot;Release this version&quot;, &quot;It will be released on App Store&quot;, showCancel: true, self) { alert in<br>            // do your task<br>            DispatchQueue.main.asyncAfter(deadline: .now() + 5) {<br>                alert?.dismiss(animated: true)<br>            }<br>        }</pre><p>Take a look at it on the GitHub repository</p><p><a href="https://github.com/bokhary3/AlertLoadingDemo">https://github.com/bokhary3/AlertLoadingDemo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d8227c7b7d86" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Handle different UICollectionViewCell in same controller]]></title>
            <link>https://medium.com/@bokhary/handle-different-uicollectionviewcell-in-same-controller-8916e25df9fc?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8916e25df9fc</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[collectionview]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Fri, 11 Sep 2020 18:57:26 GMT</pubDate>
            <atom:updated>2020-09-11T19:47:39.547Z</atom:updated>
            <content:encoded><![CDATA[<p>No need for messy if-else statements any more.</p><p>I am working on a project has more collection view screens, and each collection view has more different cells, and if you faced same situation you know you will need for more of if-else statements, and this will lead you to messy <em>cellForItem</em> method, I mad some search and find this great <a href="https://tech.busuu.com/dealing-with-different-kinds-of-cells-in-swift-part-1-of-3-18c6cd10a0b3"><strong>article</strong></a>, and here I will show how this article helped me to fix this meesy code.</p><h3>CollectionCellController</h3><p>The main piece of our patten what we will call it <strong><em>CollectionCellController</em></strong>, and this controller will be as protocol has different functions need to implement, we need a controller for each cell to register cell, dequeue cell, select action for cell, size cell, and more.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2Fq6PvWR2rYXf6R1uCTT4e%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2Fq6PvWR2rYXf6R1uCTT4e&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a09df0f6463e582b963a1aafe91b6b56/href">https://medium.com/media/a09df0f6463e582b963a1aafe91b6b56/href</a></iframe><h3>What next:</h3><p>For each <strong><em>UICollectionViewCell</em></strong> we need two things:</p><ul><li>Data model hold all data cell needs, and to differentiate between cells.</li><li>Controller to handle all cell needs.</li></ul><blockquote>We here will show model data and collection cell controller for only two cells, please see the full demo in the end of the article.</blockquote><h4>Data Models:</h4><p>For each cell, we need to provide a model data hold all data the cell will need:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2Fn9fV2UvxtlNmyfFXb08E%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2Fn9fV2UvxtlNmyfFXb08E&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c59f4702fa5d41c75fac4bdc297c3e0b/href">https://medium.com/media/c59f4702fa5d41c75fac4bdc297c3e0b/href</a></iframe><h4>XCollectionCellController</h4><p>The <strong><em>CollectionCellController</em></strong> will manage dequeuing, selecting, sizing cell, and more.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2FaOHDDLchKRLwjRettDhG%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2FaOHDDLchKRLwjRettDhG&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/8c83ab83f8286cf00723e62bb4630b9c/href">https://medium.com/media/8c83ab83f8286cf00723e62bb4630b9c/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2FZXoLIIz8uNX8ZbleBvSG%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2FZXoLIIz8uNX8ZbleBvSG&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/a310878b38b1ac1574ad09f35bffadb0/href">https://medium.com/media/a310878b38b1ac1574ad09f35bffadb0/href</a></iframe><h3>CollectionCellControllerFactory</h3><p>By using factory design pattern, we will can get the appropriate <strong><em>UICollectionViewCell</em></strong> by its data model:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2FBtFkOgCg5c7OVeDmPfTi%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2FBtFkOgCg5c7OVeDmPfTi&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/fe020ba78c41a875777b3292678b4da0/href">https://medium.com/media/fe020ba78c41a875777b3292678b4da0/href</a></iframe><h3>Collect the pieces</h3><p>In our controller we will build the collection view by using data model of cells, and then by using <strong><em>CollectionCellControllerFactory </em></strong>we will get the appropriate<strong><em> </em></strong><strong><em>CollectionCellController .</em></strong></p><blockquote><em>p.s We assume here our controller has more than one section so we use 2-D array of</em><strong><em> </em></strong><strong><em>CollectionCellControllers</em></strong><em>, so if you are using one section, you will need just 1-D array of </em><strong><em>CollectionCellController</em></strong></blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2FgNjoFaQ2WQOwFhadgeNF%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2FgNjoFaQ2WQOwFhadgeNF&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d15324f9064cd84321b038044ac58749/href">https://medium.com/media/d15324f9064cd84321b038044ac58749/href</a></iframe><h3>One single line cellForItem method!</h3><p>So now we have array of <strong><em>CollectionCellController</em></strong>s, and we only just fill methods of <strong><em>UICollectionViewDataSource</em></strong> and <strong><em>UICollectionViewDelegateFlowLayout</em></strong> protocols.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fcarbon.now.sh%2Fembed%2FCpDNbN5e7MxukeOGwvba%3F&amp;display_name=Carbon&amp;url=https%3A%2F%2Fcarbon.now.sh%2FCpDNbN5e7MxukeOGwvba&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;scroll=auto&amp;schema=carbon" width="1024" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/5237fa81964f303d27b5657e547e6b4d/href">https://medium.com/media/5237fa81964f303d27b5657e547e6b4d/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*V2QwrGyHs2RSsilr-Kjw4g.png" /></figure><blockquote>Hope this helps you in your current and coming projects. Thanks for reading.</blockquote><h4>You can check full demo from here:</h4><p><a href="https://github.com/bokhary3/HandleDifferentCellsDemo">bokhary3/HandleDifferentCellsDemo</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8916e25df9fc" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Clickable and Editable UITextView]]></title>
            <link>https://medium.com/@bokhary/clickable-and-editable-uitextview-8f7c8649a3f0?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/8f7c8649a3f0</guid>
            <category><![CDATA[uitextview]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[tips-and-tricks]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Tue, 02 Jun 2020 18:27:40 GMT</pubDate>
            <atom:updated>2020-06-02T18:27:40.239Z</atom:updated>
            <content:encoded><![CDATA[<p>UITextView is a great control, we are using it alot, and data detecting ( e.g Links, Phone Numbers, Addresses, ..) from its nice features.</p><h4>The Problem:</h4><p>When you need make UITextView clickable you should make isEditable with false, but in some situations we need to make it detectable and clickable in same time like <strong>iPhone’s Note</strong> app.</p><h4>The Solution:</h4><p>We can’t detect links in <em>UITextView</em> and <em>UITextView’s</em> isEditable = true, so we will achieve that by workaround.</p><p>First we will create a UITapGestureRecognizer and assign it to textview and in UITapGestureRecognize&#39;s action we will do two things:</p><ul><li>First make an action will fired when click a link.</li><li>Second if user don’t click a link then we will call UITextView’s becomFristResponder() method.</li></ul><h4>In Details:</h4><p>In UITapGestureRecognize&#39;s action we will get a position of tap and check if tap position is outside UITextView&#39;s text so show the keyboard, and place the cursor in that position, but if tap on link, so do link action like open the link URL.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/db4fcd7c2f69a4364b929dcf3c99bf44/href">https://medium.com/media/db4fcd7c2f69a4364b929dcf3c99bf44/href</a></iframe><p>Last thing, we should back to normal UITextView state when dismiss keyboard so we need to implement UITextViewDelegate’s textViewDidEndEditing method:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c297bf4a54786b4cf1d4d9f7237d6bc0/href">https://medium.com/media/c297bf4a54786b4cf1d4d9f7237d6bc0/href</a></iframe><h4>The Result :</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/328/1*g1fJbEFTCnhOvR64uFfozA.gif" /></figure><h4>Full Demo Repository:</h4><p><a href="https://github.com/bokhary3/TextViewClickableAndDetectable">bokhary3/TextViewClickableAndDetectable</a></p><h3>Thanks for Reading.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8f7c8649a3f0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bokhary — Phrases keyboard]]></title>
            <link>https://medium.com/@bokhary/bokhary-phrases-keyboard-37e7cd1df66f?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/37e7cd1df66f</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[keyboard-shortcuts]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[utilities]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Sun, 05 May 2019 21:26:34 GMT</pubDate>
            <atom:updated>2020-05-31T18:10:47.240Z</atom:updated>
            <content:encoded><![CDATA[<h3>LazyBoard — Phrases keyboard</h3><h4>Customize your keyboard with your most used phrases</h4><p>Welcome to my app LazyBoard, LazyBoard is a shortcut keyboard app, it save your email templates, canned support replies, fast form completion, addresses, phone numbers, email addresses, emoji, or anything you type regularly, and just need one tap when inputting.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*kyaLivXzyjidWEun0v4p8g@2x.png" /></figure><h4>Features:</h4><ul><li>Dynamic Variables.</li><li>Sync your phrases in all your iOS devices using iCloud.</li><li>Media folder to save your photos and use them in LazyBoard keyboard.</li><li>iMessage extension for Media folder to use photos easily.</li><li>Clipboard folder to save your copied phrases, and see them in LazyBoard keyboard as folder.</li><li>For your privacy, LazyBoard won’t force you to “Allow Full Access” to this keyboard. So we have no way to get your private data.</li><li>We can also type the current clipboard in one click.(Need to open the “Allow Full Access” control)</li></ul><h3>How to use LazyBoard keyboard:</h3><p><strong>1- The first thing is to add LazyBoard as a keyboard.</strong></p><p>You will need to follow steps in ‘Installing’ screen.</p><ul><li>Click ‘Take me there’ button.</li><li>Click ‘Keybords’</li><li>Enable ‘LazyBoard’</li><li>Enable ‘Allow Full Access’ (Optional)*</li></ul><p>* You need to enable ‘Allow Full Access’ to make LazyBoard can get data from clipboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*JDbsKfkCnj7uGevceMmxjA.jpeg" /></figure><h4>2- Then add your phrases</h4><ul><li>You have more forms to create your phrases, like signup, bank card, and address form, and sure you have simple phrase form.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*fi4K8WGDRW5slk9_QaTkPA.jpeg" /></figure><ul><li>You can categorize your phrases by folders.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/370/1*jT7DlB4pkEhO5piIWcYD0Q.jpeg" /></figure><h4>3- Now you can use LazyBoard keyboard 🎉.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*yV20ZdnWNXaCf7qISFGfTA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/1*9zCst5lEgFmmnofGR80wrQ.png" /></figure><h4>lazyBoard keyboard from top apps!, watch the video.</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F9eEWqa3h104%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D9eEWqa3h104&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F9eEWqa3h104%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/d1f11a1ad7d43580157bd389e0c2dc4e/href">https://medium.com/media/d1f11a1ad7d43580157bd389e0c2dc4e/href</a></iframe><h4>You can get LazyBoard app on App Store from</h4><p><a href="https://apps.apple.com/us/app/id1459047306">‎LazyBoard - Phrase Keyboard</a></p><h4>Your feedback is most welcome, please if you have any feedback don’t hesitate to send it to lazyboardapp@gmail.com.</h4><h4>Thanks for reading.</h4><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=37e7cd1df66f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fix issue of Launch screen display]]></title>
            <link>https://medium.com/@bokhary/fix-issue-of-launch-screen-display-9114f9fa74b6?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/9114f9fa74b6</guid>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[storyboard]]></category>
            <category><![CDATA[ios]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Wed, 03 Apr 2019 07:47:05 GMT</pubDate>
            <atom:updated>2019-04-03T07:47:05.604Z</atom:updated>
            <content:encoded><![CDATA[<p>You might noted that, the launch screen of your app is not displayed appropriate in sometimes, like below shots 👇</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*swnYGUYju5oYFGQ-6f1RCw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*HnWRBeJAZxKN9AsyZXPKdA.png" /><figcaption>linkedIn and ASKfm</figcaption></figure><p>I think you will not take more time, for note that happened when opening the app and green, blue, or red status bar appears. and that happens in different situations like sharing hotspot, using location in background, calling etc..</p><p>I found that, If we hide status bar the issue will be fixed.</p><h4><strong><em>Try 1</em></strong></h4><p>I thought to hide it in the first view controller, using</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ddb183c45a5719a3fb51886c0e442fd7/href">https://medium.com/media/ddb183c45a5719a3fb51886c0e442fd7/href</a></iframe><p>But this will hide status bar after launching app (🤦🏻 my bad), and it will not fix the issue.</p><h4>Final Try</h4><p>To hide status bar when launching, we can add this property</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/af675f8ebbc352f62c6954c008da5461/href">https://medium.com/media/af675f8ebbc352f62c6954c008da5461/href</a></iframe><p>to info.plist, <strong>or</strong> uncheck it in <strong>General</strong> tap</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/1*bejWmGiVFco_j3zGZowvAA.png" /><figcaption>Hide staus bar.</figcaption></figure><p>Now when launching the app, the status bar is hidden, and Launch screen appears correctly, and when app is launched, status bar will appear again.</p><p>Hope this will help you in your projects, thanks.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9114f9fa74b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Relax, I am sure my published app is not on Demo Server ]]></title>
            <link>https://medium.com/swiftcairo/relax-i-am-sure-my-published-app-is-not-on-demo-server-944869a4ea21?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/944869a4ea21</guid>
            <category><![CDATA[script]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Sun, 10 Mar 2019 20:05:22 GMT</pubDate>
            <atom:updated>2019-03-10T21:47:59.580Z</atom:updated>
            <content:encoded><![CDATA[<h3>Problem:</h3><p>Regularly I differentiate between Demo and Live URLs for my apps with boolean variable (<strong><em>isDemoServer</em></strong>), may be there are different ways to handle that, but that what I do.</p><p>So, every time when I archive my app, I am not sure, if I changed my boolean variable (<strong><em>isDemoServer</em></strong>) to proper value.</p><p>Recently I thought if I can fire error when archiving and the boolean value (<strong><em>isDemoServer)</em></strong> with true, it will be great.</p><p>My approach is creating file has <strong><em>isDemoServer</em></strong> variable, then reading file content while archiving, and checking isDemoServer value.</p><p>Immediately I thought in writing script to handle that, I googled more about that, and I found this great video (<a href="https://www.youtube.com/watch?v=c5c42DneGdY"><strong>let’s tool it</strong></a> By Ahmed Essam, I mostly recommended to watch it), and the video guided me.</p><h3>My Script</h3><p>My script with Python, it reads file content line by line, and split line by space then get variable and its value, then check, if <strong><em>isDemoServer</em></strong> is true fire the error</p><p>This code has been updated on the repo to be more generic without static dir for the file, so check the <a href="https://github.com/bokhary3/ArchiveChecker">repo</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2f67daefb716fc9253221a20d8bbba5/href">https://medium.com/media/f2f67daefb716fc9253221a20d8bbba5/href</a></iframe><p>I tested this script using build phases, and it worked fine, but I don’t need to use it while building, I need only used it when archiving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*_cY_I2HpVqzV_34SPlWNgA.png" /><figcaption>Pre-Actions at Archive tab</figcaption></figure><p>So I tried to set it in Pre-actions at Archive section in App scheme</p><p>But when I tried to archive my app, my script didn’t execute, so I googled about this issue, then I found this <a href="https://stackoverflow.com/a/5834892/5251783"><strong>great answer</strong></a> on StackOverflow,</p><p>The answer said:</p><blockquote>pre- and post-action scripts are not considered part of the build itself; their output is not part of the build log, and a failing script will not cause the build to fail.</blockquote><p>Also the answer guid me for solution of my issue:</p><blockquote>Make a new “External Build System” target, and configure it to run your script.</blockquote><p>So I googled again to how make “External Build System” target, and make it run my script.</p><h3>Creating “External Build System” target</h3><p>1- Go to File &gt; New &gt; Target…, then choose Cross-platform tab, and select External Build System</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MEOwTxmy3du0OCIi8NKIA.png" /></figure><p>2- Tap next, type target name, our script is written by Python3, so we should make build run on Python3, so we should set <em>Python3 path</em> to <strong>Build tool</strong> field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*3gRUeZoNjFarwsqP7PrQVA.png" /></figure><blockquote>To get Python3 path, open Terminal and type ‘<strong><em>which python3’</em></strong>, because I wrote my script by Python3(if you don’t install Python3, check this <a href="https://wsvincent.com/install-python3-mac/"><strong>link</strong></a>)</blockquote><h3>Configure Checker target</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*uTme1kIiqcnshN6UHsgePw.png" /><figcaption>Configure Checker target</figcaption></figure><p>Select Checker target, open <strong>Info</strong> tab, set <strong>Build Tool</strong> with <em>Python3 path</em>, and set <strong>Arguments</strong> with script file name, and finally set <strong>Directory</strong> with directory of script file.</p><h3>Configure App scheme</h3><p>After configuring <strong>Checker</strong> target, we need to configure <strong>App</strong> scheme, to make <strong>App</strong> run script file.</p><p>Select App target and click <strong>Edit Scheme…</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*js8RV_--STSm8r0Ucj9Gow.png" /></figure><p>Click plus button to add <strong>Checker</strong> target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*PH76vwR1kcSjBCrVLNfg9w.png" /></figure><p>Select <strong>Checker</strong> target, then click <strong>Add </strong>button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*qv5NxcuGlvXB_8kJOavzJQ.png" /></figure><p>After Adding <strong>Checker</strong> target, uncheck all of phases except <strong>Archive</strong> phase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*Lx4zNd-PUIU3NqfSRB4WBg.png" /><figcaption>Check Archive phase for Checker target</figcaption></figure><h3>Testing the script</h3><p>If you tried to build App on demo server e.g <strong>isDemoServer</strong> with true, it will build successfully, but if you tried to archive it, you will get this error 😀 🎉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5HYk_NzOeWIpMQJvXQEyg.png" /></figure><h4>Limitation</h4><p>There is a limitation in my script, where each line in the configuration file (that contains <strong><em>isDemoServer</em></strong>), has to has a single space between each word.</p><p>You can check demo project on <a href="https://github.com/bokhary3/ArchiveChecker">GitHub</a>, I hope this script will help you in your projects, and any feedback will be most welcome, Thanks 😊.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=944869a4ea21" width="1" height="1" alt=""><hr><p><a href="https://medium.com/swiftcairo/relax-i-am-sure-my-published-app-is-not-on-demo-server-944869a4ea21">Relax, I am sure my published app is not on Demo Server 😎</a> was originally published in <a href="https://medium.com/swiftcairo">SwiftCairo</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Relax, I am sure My published app is not on Demo Server ]]></title>
            <link>https://medium.com/@bokhary/relax-i-am-sure-my-published-app-is-not-on-demo-server-2045504a4056?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/2045504a4056</guid>
            <category><![CDATA[archive]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[pytho]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Sun, 10 Mar 2019 06:42:32 GMT</pubDate>
            <atom:updated>2019-03-10T18:23:44.606Z</atom:updated>
            <content:encoded><![CDATA[<h3>Relax, I am sure my published app is not on Demo Server 😎</h3><h3>Problem:</h3><p>Regularly I differentiate between Demo and Live URLs for my apps with boolean variable (<strong><em>isDemoServer</em></strong>), may be there are different ways to handle that, but that what I do.</p><p>So, every time when I archive my app, I am not sure, if I changed my boolean variable (<strong><em>isDemoServer</em></strong>) to proper value.</p><p>Recently I thought if I can fire error when archiving and the boolean value (<strong><em>isDemoServer)</em></strong> with true, it will be great.</p><p>My approach is creating file has <strong><em>isDemoServer</em></strong> variable, then reading file content while archiving, and checking isDemoServer value.</p><p>Immediately I thought in writing script to handle that, I googled more about that, and I found this great video (<a href="https://www.youtube.com/watch?v=c5c42DneGdY"><strong>let’s tool it</strong></a> By Ahmed Essam, I mostly recommended to watch it), and the video guided me.</p><h3>My Script</h3><p>My script with Python, it reads file content line by line, and split line by space then get variable and its value, then check, if <strong><em>isDemoServer</em></strong> is true fire the error</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f2f67daefb716fc9253221a20d8bbba5/href">https://medium.com/media/f2f67daefb716fc9253221a20d8bbba5/href</a></iframe><p>I tested this script using build phases, and it worked fine, but I don’t need to use it while building, I need only used it when archiving.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*_cY_I2HpVqzV_34SPlWNgA.png" /><figcaption>Pre-Actions at Archive tab</figcaption></figure><p>So I tried to set it in Pre-actions at Archive section in App scheme</p><p>But when I tried to archive my app, my script didn’t execute, so I googled about this issue, then I found this <a href="https://stackoverflow.com/a/5834892/5251783"><strong>great answer</strong></a> on StackOverflow,</p><p>The answer said:</p><blockquote>pre- and post-action scripts are not considered part of the build itself; their output is not part of the build log, and a failing script will not cause the build to fail.</blockquote><p>Also the answer guid me for solution of my issue:</p><blockquote>Make a new “External Build System” target, and configure it to run your script.</blockquote><p>So I googled again to how make “External Build System” target, and make it run my script.</p><h3><strong>Creating “External Build System” target</strong></h3><p>1- Go to File &gt; New &gt; Target…, then choose Cross-platform tab, and select External Build System</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9MEOwTxmy3du0OCIi8NKIA.png" /></figure><p>2- Tap next, type target name, our script is written by Python3, so we should make build run on Python3, so we should set <em>Python3 path</em> to <strong>Build tool</strong> field</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/729/1*3gRUeZoNjFarwsqP7PrQVA.png" /></figure><blockquote>To get Python3 path, open Terminal and type ‘<strong><em>which python3’</em></strong>, because I wrote my script by Python3(if you don’t install Python3, check this <a href="https://wsvincent.com/install-python3-mac/"><strong>link</strong></a>)</blockquote><h3>Configure Checker target</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/992/1*uTme1kIiqcnshN6UHsgePw.png" /><figcaption>Configure Checker target</figcaption></figure><p>Select Checker target, open <strong>Info</strong> tab, set <strong>Build Tool</strong> with <em>Python3 path</em>, and set <strong>Arguments</strong> with script file name, and finally set <strong>Directory</strong> with directory of script file.</p><h3>Configure App scheme</h3><p>After configuring <strong>Checker</strong> target, we need to configure <strong>App</strong> scheme, to make <strong>App</strong> run script file.</p><p>Select App target and click <strong>Edit Scheme…</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*js8RV_--STSm8r0Ucj9Gow.png" /></figure><p>Click plus button to add <strong>Checker</strong> target.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*PH76vwR1kcSjBCrVLNfg9w.png" /></figure><p>Select <strong>Checker</strong> target, then click <strong>Add </strong>button</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/895/1*qv5NxcuGlvXB_8kJOavzJQ.png" /></figure><p>After Adding <strong>Checker</strong> target, uncheck all of phases except <strong>Archive</strong> phase.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/897/1*Lx4zNd-PUIU3NqfSRB4WBg.png" /><figcaption>Check Archive phase for Checker target</figcaption></figure><h3>Testing the script</h3><p>If you tried to build App on demo server e.g <strong>isDemoServer</strong> with true, it will build successfully, but if you tried to archive it, you will get this error 😀 🎉.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O5HYk_NzOeWIpMQJvXQEyg.png" /></figure><h4>Limitation</h4><p>There is a limitation in my script, where each line in the configuration file (that contains <strong><em>isDemoServer</em></strong>), has to has a single space between each word.</p><p>You can check demo project on <a href="https://github.com/bokhary3/ArchiveChecker">GitHub</a>, I hope this script will help you in your projects, and any feedback will be most welcome, Thanks 😊.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2045504a4056" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Convert UITableViewController TO UIviewCntroller in Interface Builder]]></title>
            <link>https://medium.com/@bokhary/convert-uitableviewcontroller-to-uiviewcntroller-in-interface-builder-6b4bc68036b5?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/6b4bc68036b5</guid>
            <category><![CDATA[xml]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[storyboard]]></category>
            <category><![CDATA[uitableview]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Mon, 24 Dec 2018 08:24:06 GMT</pubDate>
            <atom:updated>2018-12-24T08:24:06.811Z</atom:updated>
            <content:encoded><![CDATA[<p>I usually had to change <strong><em>UITableViewController</em></strong> in Interface Builder to <strong><em>UIViewController</em></strong> when I need to add views out the table view.</p><p>So, how can we achieve that? 🤔</p><h3><strong><em>First Approach (trivial)</em></strong></h3><p>Drag <strong><em>UIViewController</em></strong> from Objects library to <strong><em>IB</em></strong> and get table view from <strong><em>UITableViewController</em></strong> and set your suitable constraints, don&#39;t forget to remove the <strong><em>UITableViewController</em></strong> from <strong><em>IB</em></strong></p><h3><strong><em>Second Approach</em></strong></h3><p>Open your storyboard as source code and search about your tableview controller, <em>You will find it like this</em> :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*NNLlpLfi6deXHlbe_lJApQ.png" /></figure><p>So change <strong><em>&lt;tableViewController </em></strong>to <strong><em>&lt;viewController</em></strong>, and also change end closing tag <strong><em>&lt;/tableViewController&gt;</em></strong> to <strong><em>&lt;/viewController&gt;</em></strong><em>.</em></p><p><em>So it will be like this</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*ikopLASHVNWC6jzgwLK_aA.png" /></figure><p>Open storyboard as Interface Builder, it will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/441/1*nm-9wA_889MYv9XG0c2Z_g.png" /></figure><p>But we need embed table view in container view🤔, so we need to open storyboard again as source code and modify it, so add <strong><em>view</em></strong> tag to contain tablview :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b33855f1e6f25d9af0051bb409badf6b/href">https://medium.com/media/b33855f1e6f25d9af0051bb409badf6b/href</a></iframe><p>and not forget to close opened tags &lt;view …&gt; and &lt;subview&gt; by adding these tags below &lt;tableview&gt; tag :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0df68dcf3b629a0980c6d0f8a946d46/href">https://medium.com/media/e0df68dcf3b629a0980c6d0f8a946d46/href</a></iframe><p>so it will be like that:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/750/1*nVIaNrchpiVRoRlhFV3LGQ.png" /></figure><p>We hope finished 🤗, but when you open storyboard and need to add constraints to table view you get this 🤦‍♂️</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/442/1*nVR-TBZ5zylwk-wcaQVOvg.png" /></figure><p>So to make constraints available you need to remove <strong><em>&lt;autoresizingMask key=”autoresizingMask” widthSizable=”YES” heightSizable=”YES”/&gt;</em></strong> tag from below <strong><em>&lt;tableview…&gt; </em></strong>tag<strong><em> </em></strong>, and add <strong><em>adtranslatesAutoresizingMaskIntoConstraints=”NO”</em></strong> property to <strong><em>&lt;tableview …&gt;</em></strong> tag, so it will look like this</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*t8s9ZHQiuyLoFMnXJOYMaA.png" /></figure><p>And now you can add constraint to your table view 🕺👏</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*Kq0JEw3ynhXnO0NHJncOWQ.png" /></figure><blockquote>You may see that approach some difficult but try to use it and I am sure you will find it easy and it deserve, and also I am sure that will be good choise when your table view so complex.</blockquote><blockquote>Hope this help you in your coming project 🙂, Thanks</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6b4bc68036b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Adaptiv UI Trick]]></title>
            <link>https://medium.com/@bokhary/adaptiv-ui-trick-abff565b0d69?source=rss-c54fb5d20eba------2</link>
            <guid isPermaLink="false">https://medium.com/p/abff565b0d69</guid>
            <category><![CDATA[adaptive-design]]></category>
            <category><![CDATA[xcode]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[constraintlayout]]></category>
            <dc:creator><![CDATA[Elsayed Hussein]]></dc:creator>
            <pubDate>Wed, 10 Jan 2018 12:26:07 GMT</pubDate>
            <atom:updated>2018-01-10T12:26:07.072Z</atom:updated>
            <content:encoded><![CDATA[<p>Adaptiv UI Trick</p><p>In <a href="https://medium.com/@bokhary/adaptive-trick-for-label-font-size-204ca6584de3">my before story</a> I showed how you can adaptive all UILabels fonts in app with simple trick, today i will show you another simple trick to adaptive all controls layout in view .</p><h3>Problem</h3><p>Always we face problem when set size or position with constant constraint, where it appears different in different devices . we can handle it with play by <em>multiplier</em> property in constraint but the <em>multiplier</em> is not sometimes good in setting position for control, for example the next image for 3 views with same size and same leading and same vertical space but the result different in the different devices:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/805/1*HlaaLDrwN8sdvGUqJqAQ-Q.png" /></figure><h3>Solution</h3><p>We will call “dp” From <a href="https://medium.com/@bokhary/adaptive-trick-for-label-font-size-204ca6584de3">mention story</a> to resolve this problem where “dp” is like Android design unit:</p><h4>For dp:</h4><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1e1154c13cb1d18c0ef86d082d6f761e/href">https://medium.com/media/1e1154c13cb1d18c0ef86d082d6f761e/href</a></iframe><h4>Solution:</h4><p>We will loop on all constraints on view and multiply it with “dp” unit :</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d2efb25adb826c2396d0233a322106a1/href">https://medium.com/media/d2efb25adb826c2396d0233a322106a1/href</a></iframe><h4>Result:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/821/1*AOmYY0uiaCXPUbL0QW2tAw.png" /></figure><p>Hope this trick help you in your apps , Thanks for reading</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abff565b0d69" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>