<?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 Minkwan Kim on Medium]]></title>
        <description><![CDATA[Stories by Minkwan Kim on Medium]]></description>
        <link>https://medium.com/@stevemk?source=rss-2eabded82075------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*xVNhnK8ZZ3SSAxWaLN-elQ.png</url>
            <title>Stories by Minkwan Kim on Medium</title>
            <link>https://medium.com/@stevemk?source=rss-2eabded82075------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 17 Nov 2026 05:08:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@stevemk/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[Can’t see the Xcode’s Canvas, if put “import SwiftUI” on over 500 lines of code.]]></title>
            <link>https://stevemk.medium.com/cant-see-the-xcode-s-canvas-if-put-import-swiftui-on-over-500-lines-of-code-3d9dcb4aebc7?source=rss-2eabded82075------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d9dcb4aebc7</guid>
            <category><![CDATA[swift]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Minkwan Kim]]></dc:creator>
            <pubDate>Wed, 13 May 2020 08:06:20 GMT</pubDate>
            <atom:updated>2022-05-06T02:06:15.603Z</atom:updated>
            <content:encoded><![CDATA[<p>Can’t see the Xcode’s Canvas, if put “import SwiftUI” on over 500 lines of code.</p><p>Looks like Xcode’s bug.</p><p>500 라인 넘어서 “import SwiftUI” 작성하면 preview canvas가 보이지 않는다.</p><p>Xcode 버그인듯…</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d9dcb4aebc7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TZImagePickerController]]></title>
            <link>https://stevemk.medium.com/tzimagepickercontroller-2beb2d6d18e7?source=rss-2eabded82075------2</link>
            <guid isPermaLink="false">https://medium.com/p/2beb2d6d18e7</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <category><![CDATA[korean]]></category>
            <category><![CDATA[objective-c]]></category>
            <dc:creator><![CDATA[Minkwan Kim]]></dc:creator>
            <pubDate>Fri, 11 May 2018 02:22:49 GMT</pubDate>
            <atom:updated>2018-05-11T02:22:49.451Z</atom:updated>
            <content:encoded><![CDATA[<p>Preview가 있는 이미지 피커를 사용할 때 이게 가장 괜찮은 것 같다.<br>정확히 원하는 화면을 위해서는 소스코드를 수정해야 하는 부분이 있지만, iPad 도 나름 지원하고 있고, 최근까지도 소스 수정이 있는 듯 하다.</p><p><a href="https://github.com/banchichen/TZImagePickerController">https://github.com/banchichen/TZImagePickerController</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2beb2d6d18e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[notice for size of statusbar when calling]]></title>
            <link>https://stevemk.medium.com/notice-for-size-of-statusbar-when-calling-374ee13de51b?source=rss-2eabded82075------2</link>
            <guid isPermaLink="false">https://medium.com/p/374ee13de51b</guid>
            <category><![CDATA[korean]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[objective-c]]></category>
            <dc:creator><![CDATA[Minkwan Kim]]></dc:creator>
            <pubDate>Fri, 11 May 2018 02:21:53 GMT</pubDate>
            <atom:updated>2018-05-11T02:22:11.714Z</atom:updated>
            <content:encoded><![CDATA[<p>전화 올 때나, 티맵, 핫스팟 실행에 따라 상태바의 크기가 변할 때, appdelegate의 아래 메서드가 불린다.</p><pre>- (void)application:(UIApplication *)application willChangeStatusBarFrame:(CGRect)newStatusBarFrame {</pre><pre>}</pre><pre>- (void)application:(UIApplication *)application didChangeStatusBarFrame:(CGRect)oldStatusBarFrame {</pre><pre>}</pre><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=374ee13de51b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A way to customize QLPreviewController on iOS10]]></title>
            <link>https://stevemk.medium.com/a-way-to-customize-qlpreviewcontroller-on-ios10-361031e2b7cb?source=rss-2eabded82075------2</link>
            <guid isPermaLink="false">https://medium.com/p/361031e2b7cb</guid>
            <category><![CDATA[korean]]></category>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[objective-c]]></category>
            <category><![CDATA[ios-app-development]]></category>
            <dc:creator><![CDATA[Minkwan Kim]]></dc:creator>
            <pubDate>Fri, 11 May 2018 02:21:11 GMT</pubDate>
            <atom:updated>2018-05-11T02:23:22.300Z</atom:updated>
            <content:encoded><![CDATA[<h3>QLPreviewController를 컨트롤하자</h3><p>어느날 QLPreviewController에 있는 share버튼을 보이지 않게 해야하는 미션이 주어졌다.</p><p>확인해 보니 기본적으로 OS에서 제공하는 QLPreviewController는 custom을 허용하지 않는다.</p><p>iOS 9 까지는 navigationController의 barItems 를 변경하는 방법으로 share버튼을 보이지 않게 할 수 있지만, iOS 10에서는 아래의 bottomBar가 새로 추가되었고, 거기에 있는 share버튼은 손댈 수 없다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/375/1*XT-T0lhzTbhUdqvQexNAmA.png" /><figcaption>iOS10에서 QLPreviewController의 기본 화면과 문제의 share버튼</figcaption></figure><p>QLPreviewController를 상속받은 viewController에서는 gestureRecognizer는 물론이고 touchDelegate들도 모두 무시된다. 또한 KVO를 이용한 observe도 가능하지 않다.</p><p>share버튼 하나 삭제하려고 이틀동안 수많은 방법으로 접근해 보았지만 적절한 방법을 찾지 못하였다.</p><h4>삽질 시작!</h4><ul><li>QLPreviewController를 상속받아 view 아래 부분에 빈 view를 덮어씌워 보이지 않게 하자!<br>-&gt; 아래 덮어씌워지기는 했지만 터치했을 때 전체화면으로 화면이 늘어나 아래의 빈view부분의 내용이 가려졌다.</li><li>그럼 터치할 때 noti받아 빈view를 보였다 안보였다 하게 만들자!<br>-&gt; gestureRecognizer, touchDelegate 모두 무시되었다.</li><li>그럼 전체화면 될 때 statusBar가 사라지니까 그 때 noti를 받아서 처리하자!<br>-&gt; KVO 역시 무시되었다.</li><li>화면 전체에 dimView를 생성하여 touch할 수 없게 만들자!<br>-&gt; touch는 할 수 없었지만, scroll또한 되지 않아서 이것도 실패.</li></ul><h4>새로운 접근?</h4><ul><li>그러다 문득 QLPreviewController를 상속받지 말고, UIViewController를 상속받아 그 안에 QLPreviewController 객체를 생성해서 사용해 보자는 생각이 들었다.<br>-&gt; 처음에는 UIViewController 안에서 QLPreviewController를 present하도록 적용하였다. 하지만 present하면 원래의 QLPreviewController가 다시 들어가서 실패.</li><li><strong>그럼 QLPreviewController를 addSubview해보면 어떨까?<br>-&gt; frame을 지정해 주지 않고 addSubview해서 빈화면이 보였다. QLPreviewController의 frame을 잡아주고 addSubview해 주니..뜨든!</strong></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*U7n-r5hlP57xpXZbTE1NqQ.png" /></figure><h4>주의할 점</h4><ul><li>주의할 점은 mainViewController에서 customPreviewController를 붙일 때 modally하게 present하면 말짱 꽝이라는 것이다.</li><li>mainViewController에서 pushView를 이용하여 뷰를 붙이면 위와같이 네비게이션 뷰에 QLPreviewController의 view만 있는 형태가 되어 원하던 share버튼을 보이지 않게 할 수 있다.</li><li>추가로 navigation의 title을 적용해 주면 완성!</li></ul><h4>소스코드</h4><ul><li>previewController.h</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/dc2a8116df1406d996338b0e5f93352a/href">https://medium.com/media/dc2a8116df1406d996338b0e5f93352a/href</a></iframe><ul><li>PreviewController.m</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3eca2366676a3d14d5af9fcb31aadb11/href">https://medium.com/media/3eca2366676a3d14d5af9fcb31aadb11/href</a></iframe><ul><li>그리고 mainViewController에서 붙일 때</li></ul><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a4fe58d46e362d07d0f2c83cc94a54f7/href">https://medium.com/media/a4fe58d46e362d07d0f2c83cc94a54f7/href</a></iframe><p>이렇게 작성하면 아래의 화면을 만날 수 있다.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/280/1*U7n-r5hlP57xpXZbTE1NqQ.png" /></figure><p>이틀동안의 삽질 끝에 방법을 찾았다! <br>구글링 해보니 아직 이 방법을 아는 (또는 알려주는)사람은 없는 것 같아 첫 포스트로 작성하게 되었다.</p><p>혼자만의 삽질기나 남겨두고 싶은 내용이 있으면 여기에 작성 해야겠다.</p><p>끝.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=361031e2b7cb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>