ML(Machine Learning)의 학습 결과는 늘 같을까?

 

아니요.

 

실험 방법은 간단하다. 인터넷에는 쉽게 구할 수 있는 개/고양이 예제가 있으니 돌려보면 된다. 다소 친절할 필요는 있어 따끈따끈하게 돌려보고 스샷를 올려 둠.

 

결과도 다르고,

 

 

물론, 모델도 다르게 나온다.

 

시간은 다음의 코드로 측정하면 된다. import 뭘 해야할지 궁금하면 자동 import 를 할 수 있는, pyCharm을 쓰면 편하다.

 

start_time = time.time()

print("interstellar :", time.strftime("%H:%M:%S", time.gmtime(time.time() - start_time)))

--------

interstellar : 00:09:08

 

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

decision science - 2  (0) 2020.04.08
지금 최고의 AI 스피커는?  (0) 2020.04.08
텔레그램은 해킹 가능할까?  (2) 2020.04.08
맥북으로 머신러닝 되나요?  (0) 2020.04.08
Decision Science  (0) 2020.04.08

GPLv3 제품을 욕하는 행동은 도저히 용납할 수 없어 글을 남긴다.

 

불가능하다.

 

의사 결정을 위해서는 다양한 지식이 필요하다. 이 매거진은 IT 분야의 의사 결정을 위해서 관련 지식을 제공하는 매거진이므로 텔레그램 n 번방에 대해서 이야기해 보려고 한다. 범죄자 입장에서 말하는 것은 여론의 뭇매를 맞을 수도 있으니 추가 범죄자들을 잡아야 하는 시각으로 써 보려고 한다.

 

이상한 안경으로 세상을 보면, 텔레그램 해킹은 매우 쉽다. 텔레그램을 쓰는 사람의 휴대폰을 뺏아 텔레그램을 열고 내용을 보면 된다. 그 외 중간에서 스니핑을 한다거나 서버의 내용을 빼는 것은 불가능하다. 

 

https://telegram.org/blog/cryptocontest

$300,000 for Cracking Telegram Encryption

$300,000 for cracking #Telegram encryption

telegram.org

 

텔레그램은 오래전부터 해킹 대회를 개최하고 있었고, 카톡뿐 아니라 전 세계 메신저들이 그들이 소스를 보고 벤치마킹하는 것으로 유명하다. 게다가 텔레그램은 푸틴이 사장(파벨 두로프)에게 열라고 지시 하자 거부하고 망명해 버린 것으로도 유명하다.

https://platum.kr/archives/27688

텔레그램 창업자, 알고보니 러시아를 떠난 정치 망명객 - 'Startup's Story Platform’

(왼쪽) 텔레그램 창업자인 파벨 두로프 몇일 새 러시아산 메신저 텔레그램(telegram)이 화제를 모으고 있습니다. 정부의 카카오톡 검열이슈에 맞물려 네티즌들이 찾은 대안입니다. 소위 ‘메신저 망명처’로도 불리우고 있습니다. 텔레그램 이야길 해보죠. 텔레그램의 창업자는 러시아의 페이스북이라 불리우는 브콘탁테(ВКонтакте, 원어식발음 ‘브깐딱쩨’, 이하 VK)의 창업자이자 최고경영자였던 파벨 …

platum.kr

 

 

그 외 텔레그램 관련 기사는 수없이 많은데,

https://news.sbs.co.kr/news/endPage.do?news_id=N1004719875

스노든 “암호 해독 키 제공 거부한 '텔레그램' 결정 지지”

러시아에 망명 중인 전 미국 정보요원 에드워드 스노든이 러시아 당국에 암호 해독 키 제공을 거부한 암호화 메신저 '텔레그램'의 결정을 지지하고 나섰습니다. 인테르팍스 통신에 따르면 스노든은 17일 자신의 트위터 계정에 올린 글에서 "나는 예전에 텔레그램 보안 모델을 비판했다.

news.sbs.co.kr

 

이번 사건으로 지난 히스토리를 아예 모르거나 의도적으로 조작을 시도하는 기자들이 보여서 기록을 남기게 되었다. 그런 의도가 컴퓨터를 잘 모르는 사람이 보기에 충분한 "가슴 덜컹"이 된다면 좋은 의도겠지만 뉴스가 그런 식으로 흘러가서는 안된다는 것은 굳이 논쟁하지 않더라도 자명한 사실이다.

 

https://biz.chosun.com/site/data/html_dir/2020/03/07/2020030701078.html

'국민앱' 카톡 10주년… 웃고 울었던 순간들

카카오톡 2010년 3월 출시부터 10년 변천사우여곡절 있었지만 이제는 카카오 최대 수익사업국민 메신저 넘어 생활 플랫폼으로 자리매김한국에서 ‘..

biz.chosun.com

 

 

http://www.mediatoday.co.kr/news/articleView.html?idxno=119312

카카오톡이 국민들에게 사과한 이유는? - 미디어오늘

www.mediatoday.co.kr

 

 

카카오톡이 다시 감청 정보를 제공하고 위기를 틈 타 서버 사용량을 확 줄인 것은 탁월한 선택이었다. 사실, 딸을 키우는 아버지의 입장에서는 범죄자를 잡는 수사협조 외엔 개인 사생활을 들여보는 것이 쉽게 다수의 동의를 얻기 힘들기 때문에 나는 감청에 찬성하는 편이다.(게다가 나는 텔레그램도 쓰니까) 내가 정말 반대였다면 조회수 10배는 더 나오던 블로거에서 티스토리로 바꿀 이유도, 브런치에 글을 쓸 이유도 없겠다. 사생활 존중하는 아이폰과 텔레그램을 선호하지만 카톡 또한 존중한다.(아이를 키우다가 사실, 생각이 변화한 케이스니 내 말은 딱히 근거도 없고, 무조건 틀렸다)

 

말하고자 하는 요지는 한국 정부보다 무서운 러시아 정부의 힘에도 굴복하지 않았던 텔레그램이라서 관련해서 협조를 받을 수 있는 길은 없다고 보면 되겠다. 그러면 텔레그램 방에서 정상적으로 나와서 사진과 텔레그램 자체를 지워버린 사람을 어떻게 추적할 수 있을까? 

 

추적할 수 없다.

 

그러나 운영 중에는 상대방 휴대폰 번호를 볼 수 있었을 테니 명단이 분명 있다.

그리고 경찰은 이런 사건이 발생했을 때 모든 사람을 잡지는 않는다. 가령 퇴폐 업소라고 하면 이용 횟수 3번 이상 + 수입 등 고려해서 잡는 것으로 알고 있다.(교도소가 무한정 있는 것은 아니니까)

 

이럴 때 국가의 수장이라면 어떤 의사 결정을 해야 할까?

 

번화가만 가도 쉽게 볼 수 있는 문제의 가게부터 잡는 게 좋지 않을까?

 

쫓겨난 그들이 앞으로 어디서 어떻게 일 할지도 함께 고민해 봐야 한다. 곤충이 먹거리가 된다면 아마 일 안 해도 굶어 죽는 국민은 없을 것 같긴 하다.

 

텔레그램은 그 어떤 메신저보다 사생활을 존중하는 메신저이다. 범죄로 악용되어 아쉽지만 살인자를 욕해야지 그 칼이나 그 칼을 만든 사람을 욕하지는 말아야겠다.

요약 : 공부용으로만 사용하세요.

+ 아이맥 프로보다 RTX3090 윈도우 데스크탑이 4배는 더 빠른 것 같습니다.

 

 

알파고가 100억 넘는 컴퓨터라는 것을 사람들이 잘 아는데도 이런 질문을 받는 경우가 있다.

답변은  됩니다. 혹은, 안됩니다.

 

라고 말한다.

 

그리고 대기업 개발 쪽 아닌, 관계자가 물어봤을 때는 그냥 안된다고 말했다.

 

노트북으로 한다면 초기엔 구글 코랩이 베스트고, 구글 클라우드가 좋다. 사실, 대형 클라우드 회사는 모두 해당 플랫폼을 가지고 있다. 오라클, IBM 도 브로셔를 보내오고 마이크로소프트의 애저, 아마존의 AWS도 ML 플랫폼이 있다.  원리는 VMWARE나 도커에 파이썬, 텐서, 케라스를 깔아 놓고 돈 받는 형태라 보인다. 가장 큰 AWS도 초창기 데이터 센터 만들 때 VMWARE 기술을 썼다는 기사가 기억난다. 불혹이라 사실 이제 가물가물하다.

 

다음과 같은 플랫폼도 있다. 

 

https://www.openml.org/home

OpenML

OpenML: exploring machine learning better, together. An open science platform for machine learning.

www.openml.org

 

 

그 외 다른 ML 클라우드 회사는 10개 넘었던 것 같은데 다 망한 것 같다.

 

페북이나 구글 하드웨어 개수가 개당 500만 원씩 잡고 30만~100만 개는 될 텐데, 1조 정도 있으면 해 볼만한 사업인 것 같다. 뭐, 국가가 쓸데없는 개 타트 업에 투자해 주는 것보다 그냥 미국 하드웨어 디립따 사서 외교 잘하고 그 하드웨어로 대학교 학생들이 만든 인공지능 모델이나 잘 돌려줘도 좋은 국가 산업이 될 거라는 생각을 해 본다.

 

서론이 길었네. 좀 더 비 개발자가 알아듣기 쉬운 답변으로는

 

맥북 에어 200만 원짜리 노트북으로 돌리면 한 3시간 걸리는 간단한 트레이닝 데이터로 모델을 만들 때, 

500만 원짜리 맥북 프로로 돌리면 한 1.5시간 걸리는 것 같고,

아이맥 프로 800만 원짜리로 돌리면 16 코어 중 5 코어 놀면서 10분 정도에 끝나는 것 같다.

 

맥은 머신러닝 하기 좋은 시스템 플랫폼이 아니다.

 

AMD는 GPU 지원이 nVidia보다 못해서 난 CPU로 돌린다. pyCharm에서 gpu 패키지가 잘 안되거든... ㅡㅡ; 4년 전 Sli나 Crossfire로 GPU 4개씩 사서 머신러닝 한다고 국가 돈 타갔던 회사들은 그걸로 신나게 게임하고 있으리라 생각한다. 혹은 구석에 처박혀 있거낰ㅋㅋㅋ 리눅스에 구축한 텐서의 경우 CPU로는 돌릴 수가 없는 상태. 그래도 아이맥 프로는 plaidbench keras mobilenet 벤치를 돌렸을 때 7초 안에 프롬프트가 뜬다.

 

2년 전이었나? 3년 전이었나... 클라우드 머신으로 돌렸을 때 기억으로는 트레이닝 비용이 월 380만 원 정도가 나왔던 것 같다. 그때 트레이닝 데이터가 지금보다 더 많지는 않았던 것 같은데...(이미지 크기가 다르긴 했으니 1:1 비교는 불가겠지만)

 

암튼, 모델 짜는 것은 종이와 연필이면 충분하고 머신 러닝 돌리는 것은 휴대용에서는 안 하는 게 좋다. 클라우드는 너무 비싸. 좋은 데이터 있으면 클라우드 업체와 딜이 되긴 한다. 걔네들도 뭐, 데이터 없으면 땡이니까.

 

요샌 나 같은 경우 모델 하나로 만들지 않고 어차피 프로그래밍이 되니 여러 모델을 거치도록 설계하기 때문에 클라우드 쓸 일도 없다. 기업 담당자 잘 꼬셔서 맥 프로 최고 사양으로 뽑는 게 좋다. 뭐... AMD GPU도 아직은 아니지만 좀 더 나아지겠지 ^^;; 그리고 어차피 VR, AR 도 하니까 그리고 그래픽 카드 내구성보다는 제온 같은 CPU가 오래 돌리는데 좀 더 안정감을 느끼긴 하다. 3년 이상씩 하드웨어 고장 났을 때만 컴퓨터 끄며 그 외엔 계속 돌려도 하드 디스크 메모리, 그래픽 카드만 뻑났었지 CPU가 죽은 적은 없었기에...

 

내가 데이터 엔지니어를 하는 이유는 이미 늙었고, 했던 분야가 모두 그쪽인 이유도 있지만. 데이터 분석가, 과학자 쪽은 의사결정 쪽과는 거리가 멀다. 의사 결정 또 한 내가 하는 것이 아니다. 잘 뽑은 모델로 한 예측을 잘 보여줄 때 큰돈을 움직이는 사람들이 의사 결정을 하는 것이다. 3D로 잘 보여 주면 더 좋고.

 

3개의 글로 이 매거진의 성격은 어느 정도 파악되었으리라 생각된다.

길을 걸으며 목적지까지 가다,

그 길에 여러 개의 신호등이 존재한다고 하자. 그리고 한 번은 다른 쪽 보행 도로로 넘어가야 할 때, 바로 앞 신호등과 다음 사거리 신호등이 있다면 어떤 신호등을 선택하는 것이 최적의 선택일까?

 

거리가 휘어져 있지 않고 직각이라서 어느 쪽으로 건너더라도 목적지까지의 거리가 같다면, 아마 다음과 같은 여러 생각을 하게 된다.

 

1. 우선 신호 체계와 변환 시각, 현재 신호등 상태, 내 보폭을 고려한 속도 등을 알아야 한다.

2. 바로 앞 신호등이 방금 녹색으로 바뀌었다면 바로 지금 건너는 것이 맞다.

 - 어차피 건너야 할 신호등이기 때문.

3. 바로 앞 신호등이 방금 빨간색으로 바뀌었다면 다음 신호등까지 우선 걷고, 건너는 편이 낫다.

 - 사거리 신호등까지 도착했을 때 신호등 점멸 시간과 내 보폭 등을 고려한 속도와 거리의 상관관계를 분석하기보다. 우선, 사거리까지 걸어가면 직진할 수 있는 신호등을 빨리 만날 수도 있고 길을 건널 신호등을 만날 수도 있기 때문.

4.... 

 

여러 생각을 하지만 세상의 문제는 이처럼 단순하지도 복잡하지도 않다.

 

투입 비용 대 효용가치를 따졌을 때 일일이 계산하고 있는 것 자체가 잘못된 것이기 때문이다. 물론, 개인의 경우 말고 한국 도로의 신호 체계를 따진다면 ROI가 나쁘지 않다. 

 나는 수많은 택시 기사에게서 대로의 신호등 체계가 잘못되었다는 말을 수십 년 간 들었다. 신호 바뀌어서 가면 다음 신호에서 꼭 막히는 지역이 있었다. 꼭 운전을 많이 하시는 택시 기사분들의 말씀을 빌리지 않더라도, 미국에서는 차량 감지 센서가 신호를 열어주는 경험을 했었기에 운전자이기도 한 내가 한국의 특정 도시는 큰 대로변인데도 불구하고 잘못된 신호 체계를 가지고 있음을 아주 쉽게 알 수 있다. 물론, 대로변 신호를 무조건 뚫는 것이 안전과도 직결된 문제라 쉽게 생각하지는 않다. 만약, 그렇다면 홍보를 좀 했으면 하는 생각이기에 분명 무언가 틀렸다고 말할 수는 있다.

 

개인이 길을 걷는 경우

를 다시 생각해 보자. 잘못된 신호등 알고리즘 이야 자명한 사실이라 내가 말할 수 있지만 이제 불혹의 나이에서 "카더라"로 비판을 할 수는 없기에(그 전에도 사실만으로 비판했기에 메이저 뉴스에 나갔으나) 이제 정말 개인적인 예를 들어 보려고 한다. Decision Science는 적어도 사람이 판단하는 것보다는 나은 판단을 해야 하는데 내가 신호등을 지금 건너는 게 맞는지 인공지능(Ok google이나 hey siri)에게 물었을 때 과연 신호등을 건너는 것에 대한 판단을 인공지능이 제대로 내려 줄 수 있을까?라는 것에 의문을 던져 본다.

 

우선은, 아니다.

 

라는 결론을 내어 본다. 나는 하루의 대부분을 사무실에서 햇볕을 쬐지 못하고 지낸다. 대부분 회사 근처에 숙소를 잡는 생활을 해 온 나로서는 신호등 선택으로 시간 몇 분을 줄이는 것은 내 요구사항에 거의 없다고 봐야 한다. 지각해야 한다면, 그냥 지각을 해버리는 나로서는. 아예 0으로 봐도 무방하다. 

 

그래서 적어도 내 기준에서 이 문제에 대해 제대로 된 결정을 내려줄 수 있는 인공 기능이라면, 건물 사이로 햇빛을 받을 수 있는 신호등이라는 새로운 판단 기준이 있어야 한다는 것이다. 

 

이 경우, 내가 이 사실을 알고 알고리즘을 짤 때 변수로 넣으면 그만이겠지만 트레이닝 데이터로 알고리즘을 만들어 내는 AI의 경우 관련 데이터가 없다면 절대 제대로 된 모델이 나올 수 없다. 규칙이 명확하고 단순한 문제들은 스스로 길을 찾기도 하지만 현실 문제를 풀기에는 부족하고 그 모든 정보 해결에 대한 모델을 합치기에는 하드웨어가 부족하다. 양자 컴퓨터가 나와도 어느 정도는 의사 결정을 내려 주겠으나 내 삶에 대한 포괄적인 결정을 내려주기에는 부족해 보인다.

 

그런 점에서 Decision Science가 매력적으로 보인다. 사람의 거짓말 정도는 조금 줄여 줄 수 있을 것 같다.

머신러닝 종류는 많습니다.

https://en.proft.me/media/science/ml_types2.png

 

저도 잘 몰라요. 의사의 공부 코스도 모르지만 일반인으로 생각할 때, 의사가 되기 위해 공부한다는 것보다. 외과나 소아과처럼 조금 더 세부적으로 정하면 좋겠다는 생각입니다.

 

그리고 눈에 바로 보이면 좀 더 흥미롭겠지요.

 

강화 학습은... 텐서 플로우 기반 AWS DeepRacer를

https://youtu.be/HYkBQKXP3nY

 

 

지도 학습은 텐서 플로우 기반 구글 티처블 머신을

 

https://youtu.be/H76mvSFemi4

 

 

원리를 알고 싶다면, 날코딩을

 

http://www.yes24.com/Product/Goods/75732024?scode=032&OzSrank=1

파이썬 날코딩으로 알고 짜는 딥러닝

인공 신경망 원리와 응용을 파이썬 날코딩으로 정말 깊이 이해하자!『파이썬 날코딩으로 알고 짜는 딥러닝』 은 딥러닝 알고리즘의 원리를 깊숙이 이해하고 이를 파이썬 코딩만으로 구현하는 데 주안점을 둔다. 이를 위해 가장 간단한 신경망 구조부터 복잡한 응용 구조까지 다양한 딥러닝 신경망 예제의 실제 구현 과정을 소개한다. 그 과정에서 독자...

www.yes24.com

구매하기

 

 

추천합니다.

 

그리고 결과와 관계없이 몰입하셔서,

http://www.yes24.com/24/AuthorFile/Author/337?scode=008_001

미하이 칙센트미하이 소개 & 대표작 | YES24 작가파일

www.yes24.com

 

 

일상에서 행복을 느끼시길~ 10년이 그냥 갈 듯...

알고리즘으로 검색을 많이 하나 보다.

 

기본적 내용이지만
기본이 가장 중요함.
VPP 버전 사면 된다. 3900원. 2년 넘게 지속 업뎃 해 주었던 것 같다. 일본인이라 ... 시국이 ... 그러나 개발자는 하나.

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

Decision Science  (0) 2020.04.08
머신 러닝을 배우는 빠른 방법  (0) 2020.04.08
스토리보드 이동 방법  (0) 2019.02.14
제주도 항공 촬영  (0) 2019.01.19
C의 struct와 Swift 의 struct  (0) 2019.01.19

그 동안 링크를 따라가보면 아셨겠지만, 


https://www.iosnoops.com/iphone-ipad-apps-gone-free/


가 원본 출처입니다.


우리나라 사람이 위의 출처에서 자신이 만든 것처럼 하여 올리는 것을 계속 보고 있다가


귀찮은지 특정앱을 빼버리는 행태를 보고 해당 카테고리의 글을 쓰기 시작했고,


이제 어느 정도 검색이 활성화 될 것이기에 더 이상 쓰지 않아도 될 것 같습니다.


위의 사이트에서 받으시기 바랍니다.


^^v

'Swift & Python 실무' 카테고리의 다른 글

iOS 13 버전 대응 Push 라이브러리 패치 내용  (5) 2020.08.24
Floating Menu  (0) 2020.06.22
앱스토어 무료 앱 31일  (0) 2019.03.31
앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
Top Apps Gone Free of the Weekend

The River Test™

  • Status: Deal Availability
  • Rating: 
  • Developer: Patricia...

Test yourself and test your friends! Overview The River Test game is created to assure you have the perfect environment to solve the task. It contains all the necessary tools you will need and it prevents you from doing a mistake. Rules • Only 2 people on the raft at a time • The Father cannot stay with any of the daughters, without their...

Yeti Pie

Games

  • Status: 
  • Rating: 
  • Developer: Joe...

Transport your stolen pizza through the woods. Don't drop it! Bigfoot, Sasquatch, Yowie, Yeti... whatever you call them, you know what they are, and you're probably aware that they steal food, such as a pie cooling on a windowsill. Yeti Pie is the adventure the stolen pies take through the forest. Play by yourself to relax, or sign in to Game Center and...

Kompressor - Compress images

Photo-Video

  • Status: 
  • Rating: 
  • Developer: Maysam...

Do you need to compress an image before sharing it with your friends? This is what you need. With option to choose the compression ratio, you can apply some nice filters to your image. There are three compression levels to choose from and you can see the new image size in realtime using the power of MetalKit.

Block Distracting Websites

Productivity

  • Status: 
  • Rating: 
  • Developer: Pawel...

"It's a great way to save time, and stop browsing Reddit when you should be doing coursework." App has been featured by LIFEHACKER.COM Inspired by a well known SelfControl, it aims to provide a similar functionality on iOS. Have you ever wasted your time on the Internet? Having trouble getting stuff done because of procrastination? Do you need...

Gizmo Finder: find lost gadget

Utilities

  • Status: 
  • Rating: 
  • Developer: Asher L....

Find headphones, AirPods, Fitbit, smartwatch or ANY gadget that is broadcasting in Bluetooth 4.0+. These include the following: ◆ Apple Devices: iPhone, iPad, AirPods, Watch, Pencil, Macbook ◆ Headphones, health bands, smartwatches, phones, trackers, home cameras and other gadgets from any platform or company like: Android Wear, Beats, Bose...

 Games
IQ Test & IQ challenge: What's my IQ?

Universal App – Designed for iPhone and iPad

Status:  || Developer: Patricia Romani || Version: 1.1

Join the Dots HD

iPad App – Designed for iPad only

Status:  || Developer: Rivendel Studio || Version: 1.5.1

 Entertainment
Soundboard Sounds for Fortnite

Universal App – Designed for iPhone and iPad

Status:  || Developer: Em Nguyen Thi || Version: 1.0

 Utilities
NoteFace - Lock Screen & Watch

iPhone App – Designed for iPhone, compatible with iPad

Status:  || Developer: Yingchi Wang || Version: 9.2

Remote Control for Mac - Lite

Universal App – Designed for iPhone and iPad

Status:  || Developer: Evgeny Cherpak || Version: 11.2.0

Internet Speed Pro - Mobile

Universal App – Designed for iPhone and iPad

Status:  || Developer: Nutec Development, LLC || Version: 1.90

 Health-Fitness
Sky Tripping Meditations

Universal App – Designed for iPhone and iPad

Status:  || Developer: Uhhhmagine || Version: 1.7.5

 Education
Animal Math Preschool Math Games for Kids Math App

Universal App – Designed for iPhone and iPad

Status:  || Developer: Eggroll Games LLC || Version: 1.6


'Swift & Python 실무' 카테고리의 다른 글

Floating Menu  (0) 2020.06.22
마지막 오늘의 무료 앱  (0) 2019.04.01
앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28


Top Apps Gone Free of the Day

Crossword Puzzles...

  • Status: Deal Availability
  • Rating: 
  • Developer: Vintolo Ltd

Test your vocabulary and guessing skills. Fill empty squares with letter and solve crossword. Every word has a hint phrase to help you.

Duck Warfare

Games

  • Status: Deal Availability
  • Rating: 
  • Developer: allen park

A game by Kenny Park. The GÜSCO (pronounced goose-co) corporation is trying to take your park! Join forces with over 20 ducks and fight for your home in the quackiest game ever! FEATURES: • Simple controls for anyone to pick up and play • 24 ducks to unlock and fight with, each with unique attacks and animations • 5 Areas with 40...

Alien Shooter - Survive

Games

  • Status: Deal Availability
  • Rating: 
  • Developer: Sigma Team

This is a SPECIAL version of the legendary Alien Shooter game, created upon the numerous gamers' requests from all over the world! Try Survive mode, gain top results, share your achievements using Game Center and compete with the others across the Globe. "With a wonderful array of weapons, non-stop action, splendid graphics, eerie music and a...

MazeQuest - An Adventure RPG

Games

  • Status: Deal Availability
  • Rating: 
  • Developer: William Orr

The King has been kidnapped, and the land of Reynard is under siege! Gather a party, and travel your way to different lands in a quest to re-seal an ancient evil. MazeQuest is a throwback to the 16 bit RPG era, with colorful 2d graphics and top-down turn based combat. The game is designed to be simple enough for casual players, but with a level of...

Matching - Two Player Card Game

Education

  • Status: Deal Availability
  • Rating: 
  • Developer: Ellie's...

Note from Erik: New version coming soon! Train your memory with this beautiful concentration style card game with playful sounds, fun graphics and smooth animations. Two Player Split Screen (iPad) is a great way to play Matching with your kids! Race against each other with specific settings for each player! You can play 20 cards while your child...

 Games
Montezuma Puzzle 4 Premium

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: ECO Pawel Jarosz || Version: 1.0.1

Tank Battle - Mini War

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Waterpower Technology || Version: 8.01

Moto Race Pro

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: 3g60 || Version: 3.67

Flight Unlimited X

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Flight Systems LLC || Version: 1.3

 Lifestyle
LikeSo

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Say It Media Inc. || Version: 1.4

 Utilities
Visual Timer - Time Tracker PRO

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Saliha Bhutta || Version: 1.3

 Education
Moona Veggies: Toddler Kids Learning Puzzle Games

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Mariya Stavinskaya || Version: 1.1.1

A Parcel of Courage book for kids with puzzles

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Mariya Stavinskaya || Version: 1.5.3

 Travel
Block id for minecraft pe

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Tuan Nguyen || Version: 1.1








'Swift & Python 실무' 카테고리의 다른 글

마지막 오늘의 무료 앱  (0) 2019.04.01
앱스토어 무료 앱 31일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28
3월 27일 오늘만 무료 앱  (0) 2019.03.26
Top Apps Gone Free of the Day

btw – puzzle maze

  • Status: 
  • Rating: 
  • Developer: Alexandr...

Engaing, innovative, minimal puzzle game with dozens of levels. The aim is simple: you need to move through the field and pickup all the circles. The problem is they are visible only on one of two colors – that's why you should use toggles to switch the light. *** How to play *** The design is simple and there are different levels. A color line...

PixelMaze

Games

  • Status: 
  • Rating: 
  • Developer: Juhapekka...

Puzzle mode in 2D: - Collect all pixels. - Find goal. - You have 100 seconds. Endless Mode in 3D: - Collect pixels for more time. - Find goal. - You have 100 seconds. Key Features: - Multi-Fingered Exercises - Mesmerising Soundtrack - Arcade Sound Effects - Rage Against Time - Stumping Puzzles - Retro Style - 37 Levels - Multiple Colours - Pixels...

Sprocket

Games

  • Status: 
  • Rating: 
  • Developer: Pixonite...

Tap anywhere to leap from one pod to the next. You will always leap away from the center of the screen. Be sure not to land on the space between the pods, and don't let yourself get pulled into oblivion at the center of the screen. Capture the fixed dot for an extra 15 points and a temporary safe zone. Capture the moving dot for an extra 30 points (and for...

TextHere – AR posts everywhere

Lifestyle

  • Status: 
  • Rating: 
  • Developer: V1 Group...

TextHere, make 3D post and post it in AR world. Many fantastic templates are in TextHere. Read posts from every TextHere user in real world, like and comment them. {Make Post} Make 3D post in TextHere. Thinking, feeling, mood, joke, story, all of them can be made a post. You can set the post to public or private. Write your first and unique post in...

Remember To Buy!

Productivity

  • Status: 
  • Rating: 
  • Developer: Evandro...

This practical grocery list app will help you fly right through the store. It’s for anyone looking to keep things simple and avoid complicated menu systems. Key features • New items can take on quantities with just a tap. • Items can also be grouped by aisle with the help of colored tags. • While shopping just tap to mark items off...

 Games
Smart ships

Universal App – Designed for iPhone and iPad

Status:  || Developer: Leonid Grebenyuk || Version: 12.0

Block vs Block

Universal App – Designed for iPhone and iPad

Status:  || Developer: Waterpower Technology || Version: 12.10

Future Ludo

Universal App – Designed for iPhone and iPad

Status:  || Developer: Waterpower Technology || Version: 8.01

Boxed In

Universal App – Designed for iPhone and iPad

Status:  || Developer: Dennis Mengelt || Version: 2.2

 Social networking
Tweety Pro Widgets for Twitter

Universal App – Designed for iPhone and iPad

Status: Deal Availability || Developer: Roxwin Vietnam... || Version: 2.3

 Music
Erol Singer's Studio

Universal App – Designed for iPhone and iPad

Status:  || Developer: Erol Studios || Version: 2.5

 Health-Fitness
BodyShapr: Body Progress Photo

iPhone App – Designed for iPhone, compatible with iPad

Status:  || Developer: Grupo Novo PMP Srl || Version: 1.0.5

 Education
3rd Grade Reading Prep

Universal App – Designed for iPhone and iPad

Status:  || Developer: Peekaboo Studios LLC || Version: 2.0

 Reference
Texas Rules of Civil Procedure (LawStack's TX Law)

Universal App – Designed for iPhone and iPad

Status:  || Developer: Tekk Innovations LLC || Version: 8.533.20170611

Vietnam War Interactive (Full Version)

iPad App – Designed for iPad only

Status: Deal Availability || Developer: Touchzing Media || Version: 1.2

About our daily lists…

Prices change constantly, the apps above may not be free anymore when you read this post.

When a deal is active, the following icon will appear next to the app: 

When a deal is expired, the following icon will appear next to the app: 

For real-time app deals and updates, check out our Real-Time Deals section. Also make sure to check out our Apps Gone Free section, many apps that went free recently are still free today.


'Swift & Python 실무' 카테고리의 다른 글

앱스토어 무료 앱 31일  (0) 2019.03.31
앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28
3월 27일 오늘만 무료 앱  (0) 2019.03.26
3월 26일 오늘만 무료앱  (0) 2019.03.26
Top Apps Gone Free of the Day

Tap! Tap! Boxer's Story

  • Status: 
  • Rating: 
  • Developer: Bureikou.co...

This is a sugoroku-type boxer training game set in a boxing gym. Each time, Various boxers visit your gym. Second job is to make the practice your boxer, and to support him to grab the glory. In the bout, please instruction (tap) to depending on the situation. Can you grow a world champion within 15 laps ? only the dice knows it ! Bout Instructions to...

QUOTATO

Productivity

  • Status: 
  • Rating: 
  • Developer: Igor Igor

Amazingly simple minimalistic app for collecting your favorite quotes. • heard it? write it down! • all quotes in a single place • an easy-to-use list, nothing extra • easy sharing • automatic iCloud backup To be great, you need to learn from the best. We believe that you can start by simply writing the quotes down - the...

Tape Measure AR

Productivity

  • Status: 
  • Rating: 
  • Developer: Aexol

Measuring Tape AR is an innovative utility app that uses augmented reality (AR) to redefine the way of measuring things. Measuring Tape AR is the fastest, smartest way to measure physical object's dimensions or any distances! Features: - Just two taps are required to capture any point-to-point measurement - Displays in metric or imperial units - Save...

Pocket Glasses PRO

Utilities

  • Status: 
  • Rating: 
  • Developer: Aexol

Pocket Glasses is a pocket magnifier app that helps users to see small things without the glasses. Pocket Glasses app solves all these problems once and for all! Easily changed that tiny blurry text into clear and readable text with zoom and flashlight built-in features. Great for presbyopia! IMPORTANT! You must give a camera and mic permissions for...

Alti - Altimeter & Compass

Navigation

  • Status: 
  • Rating: 
  • Developer: Monkeys...

Alti is a beautiful, feature-rich, minimalist altimeter and compass application for your iPhone and iPad. It sports a clean design, includes a wide selection of background colours, and provides a distraction-free experience. It includes an altitude indicator, a magnetic and true north compass, and coordinates for DMS and degrees. ----- Features: #...

 Games
Color Twin

Universal App – Designed for iPhone and iPad

Status:  || Developer: AMAN JAIN || Version: 3.0

Merc - commodity trading game

Universal App – Designed for iPhone and iPad

Status:  || Developer: Infinite Software || Version: 3.0

The Blocking Dead

Universal App – Designed for iPhone and iPad

Status:  || Developer: Drew Rogers || Version: 2.0

Super Lines

Universal App – Designed for iPhone and iPad

Status:  || Developer: Waterpower Technology || Version: 6.01

Reality Chinese Checkers

Universal App – Designed for iPhone and iPad

Status:  || Developer: Waterpower Technology || Version: 11.01

 Lifestyle
Baby Beat™ Heartbeat Monitor

iPhone App – Designed for iPhone, compatible with iPad

Status:  || Developer: BazilSoft || Version: 3.0

 Utilities
Live Cams Pro

Universal App – Designed for iPhone and iPad

Status:  || Developer: Eggman Technologies Inc. || Version: 5.0.5

Spy hidden camera Detector

Universal App – Designed for iPhone and iPad

Status:  || Developer: Asher L. Poretz || Version: 9

 Productivity
Magic Contacts Pro with Notification Center Widget

Universal App – Designed for iPhone and iPad

Status:  || Developer: Roxwin Vietnam... || Version: 1.2.3

 Health-Fitness
Sonic Sleep Coach Alarm Clock

iPhone App – Designed for iPhone, compatible with iPad

Status:  || Developer: Proactive Life LLC || Version: 1.7.0

 Sports
Fantasy Football Manager FPL

Universal App – Designed for iPhone and iPad

Status:  || Developer: Andrew Stephenson || Version: 10.9


'Swift & Python 실무' 카테고리의 다른 글

앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
3월 27일 오늘만 무료 앱  (0) 2019.03.26
3월 26일 오늘만 무료앱  (0) 2019.03.26
swift python 배열  (0) 2019.03.25
Top Apps Gone Free of the Day

Thermo-hygrometer

  • Status: 
  • Rating: 
  • Developer: KYU TAE...

Thermo-Hygrometer is a weather app, using GPS location. Displays outside temperature, humidity, air pressure and THI of current location. Every day feel the design of analog sensibility. - Point unit thermometer (Fahrenheit or Celsius) - High and low temperature indicators - Feels Like Temperature - Hygrometer - Barometer (hPa / InchHg / mmHg) - Support...

Forecast - Another Weather App

Weather

  • Status: 
  • Rating: 
  • Developer: Thodoris...

Forecast is an application that shows you the weather in a beautiful way. Everything is in one place and with a simple swipe you can get details about the current day or the week. Features: * Current weather conditions * Weekly forecast * Daily temperature graphs * Daily precipitation graphs * C° and F° * 4 colour themes * Accessibility support ...

YoWindow Weather

Weather

  • Status: 
  • Rating: 
  • Developer: Pavel...

YoWindow is a unique new weather app. The magic of YoWindow is a living landscape that reflects your actual weather. For instance, if it's raining - it rains in YoWindow. The sunset and the sunrise in YoWindow happens at exactly the same time as in real life. But the great thing is you can scroll the time forward. Just swipe the screen and you will see...

iWheel Decision Maker Decide

Entertainment

  • Status: 
  • Rating: 
  • Developer: Digital...

Don't let your head spin - leave the spinning to the iWheel Decision Maker app! Let this app make decisions when you don’t want to, or when it is hard to choose from similar options. Get the nice decision maker app for your daily decisions, random decision making or just for fun.

Simple Zazen Timer

Health-Fitness

  • Status: 
  • Rating: 
  • Developer: Pawel...

"Thank you for sharing with us, meditators, this timer. It is our company along the silent way." "In a world of increasing complexity, simple is beautiful. With an elegant design and minimal user interface, this app captures just what meditation is about: calm, peace, mindfulness and self-awareness. Recommended for daily practice, or as a...

 Games
Jumpy Kangaroo

Universal App – Designed for iPhone and iPad

Status:  || Developer: Abdusodiq Saidov || Version: 1.0

Fresh Reversi – Othello Like Strategy...

Universal App – Designed for iPhone and iPad

Status:  || Developer: Alexander Deplov || Version: 1.5.93

Get 'Em

Universal App – Designed for iPhone and iPad

Status:  || Developer: Behdad Sami... || Version: 1.1.6

h Find The Differences 2 HD

iPad App – Designed for iPad only

Status:  || Developer: Vardan Grigoryan || Version:

h Find The Differences 1 HD

iPad App – Designed for iPad only

Status:  || Developer: Vardan Grigoryan || Version:

 Utilities
Keyboard X-Key

Universal App – Designed for iPhone and iPad

Status:  || Developer: Daniele Miglioli || Version: 1.4.2


'Swift & Python 실무' 카테고리의 다른 글

앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28
3월 26일 오늘만 무료앱  (0) 2019.03.26
swift python 배열  (0) 2019.03.25

iPhone & iPad Apps Gone Free – March 25, 2019

iPhone & iPad Apps Gone Free - March 25, 2019

Want to try great apps without hurting your wallet?

Today’s batch of apps gone free includes Trigono and many others.

Top Apps Gone Free of the Day

Trigono - dangerous triangles

  • Status: 
  • Rating: 
  • Developer: Live...

You are the little Trigono who wants to survive in hazardous triangle world. Avoid the red, or you explode. The good thing is you have an unlimited number of lives in this game. If you made a mistake – just restart a level. Trigono cannot stand still and always moving because he is scared. Don't worry; first levels are explicitly made to teach you to...

Asketch

Entertainment

  • Status: 
  • Rating: 
  • Developer: Andrew Kern

Asketch is a unique and versatile sketch pad that fits in your pocket. It allows creativity on the go, anytime, anywhere. Its deliberate simplicity makes it perfect for beginners who want to learn to draw; equally, advanced artists will find a wonderful buttery, tonal canvas for their life studies, cartoons, abstracts, landscapes and other subjects. The...

Sleep Sounds: relaxing sounds

Health-Fitness

  • Status: 
  • Rating: 
  • Developer: Dmitriy...

Sounds was recorded in most beautiful places around world. All sounds recorded with high quality stereo condenser microphones and preamps. (besides generated sounds: white pink brown noises and binaural beats) Additional features: Auto off timer Reliable alarm clock Sounds: white noise pink noise unicorn music box teddy bear music box ballerina...

Cut Me Out - Photo cut editor

Today's Pick

Photo-Video

  • Status: 
  • Rating: 
  • Developer: Swathi...

Cut out sections of an image in any shape and paste it to selected background photo with Cut Me Out . Erase background, add funny stickers, overlay text on pic,create flip effect, twin effect and create beautiful collage and share it on Instagram, Facebook, etc. MAIN FEATURES::: - Cut out any shape from the image and paste it on background Image. Very...

Accurately Financial Calculator

Finance

  • Status: 
  • Rating: 
  • Developer: Stonecress

Financial Calculator - Time Value of Money calculations - Periods/Year set {12, 4, 2, 1} for monthly, quarterly, semiannual, and annual payments - Amortization Schedule - Memory functions - Operations as close as possible to a hardware calculator such as BA II Plus For manual and more information, please visit http://stonecress.com/accurately

 Games
PopStar with Undo

Universal App – Designed for iPhone and iPad

Status:  || Developer: Waterpower Technology || Version: 7.01

 Photo-Video
Planetical - Tiny planet App

Universal App – Designed for iPhone and iPad

Status:  || Developer: Ilya Kirichek || Version: 3.0.5

 Utilities
Electronics Calculators

Universal App – Designed for iPhone and iPad

Status:  || Developer: Mustafa T. Mohammed || Version: 2.4.5

 Social networking
Spher - All Social Media Apps (In One)

Universal App – Designed for iPhone and iPad

Status:  || Developer: lovekesh Kumar || Version: 1.0

 Health-Fitness
Biceps Triceps & Arm Exercises and Workout...

Universal App – Designed for iPhone and iPad

Status:  || Developer: Sam Buhrle || Version: 1.4

About our daily lists…

Prices change constantly, the apps above may not be free anymore when you read this post.

When a deal is active, the following icon will appear next to the app: 

When a deal is expired, the following icon will appear next to the app: 

For real-time app deals and updates, check out our Real-Time Deals section. Also make sure to check out our Apps Gone Free section, many apps that went free recently are still free today.


'Swift & Python 실무' 카테고리의 다른 글

앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28
3월 27일 오늘만 무료 앱  (0) 2019.03.26
swift python 배열  (0) 2019.03.25

Swift의 배열과 Python의 배열은 유사한 점이 많지만, 문법과 기능에는 약간의 차이가 있습니다.

유사점:

  1. 인덱스를 사용하여 배열 요소에 접근할 수 있습니다.
  2. 배열의 길이를 확인할 수 있습니다.
  3. 배열에 요소를 추가하거나 제거할 수 있습니다.
  4. 배열을 슬라이싱(일부분 추출)할 수 있습니다.

차이점:

  1. 문법:
    • Swift: let numbers = [1, 2, 3, 4, 5]
    • Python: numbers = [1, 2, 3, 4, 5]
  2. 타입:
    • Swift의 배열은 동일한 타입의 요소만 포함할 수 있습니다. (예: [Int], [String] 등)
    • Python의 배열(리스트)은 다양한 타입의 요소를 포함할 수 있습니다.
  3. 불변성:
    • Swift에서는 let으로 선언된 배열은 불변(immutable)이며, var로 선언된 배열은 가변(mutable)입니다.
    • Python에서는 기본적으로 모든 배열(리스트)이 가변적입니다.
  4. 기능:
    • Swift의 배열은 다양한 메서드와 프로퍼티를 제공합니다. (예: append(), remove(at:), count 등)
    • Python의 배열(리스트)도 다양한 메서드와 함수를 제공하지만, 일부 기능은 Swift와 다를 수 있습니다.

전반적으로 Swift의 배열과 Python의 배열은 유사한 개념과 기능을 가지고 있지만, 언어의 특성에 따라 문법과 세부 기능에는 약간의 차이가 있습니다.

'Swift & Python 실무' 카테고리의 다른 글

앱스토어 무료 앱 30일  (0) 2019.03.31
오늘만 무료 앱 3월 29일  (0) 2019.03.29
오늘만 무료앱 2019년 3월 28일  (0) 2019.03.28
3월 27일 오늘만 무료 앱  (0) 2019.03.26
3월 26일 오늘만 무료앱  (0) 2019.03.26

#This document will be continuously updated.

내가 쓴 글을 소스로 끌로드와 chatgpt 에 넣어서 갈았다. 간단히 물어보는 것보다 직접 쓴 글 전체를 소스로 제공하는게 내가 하고자 하는 질문에 더 가까운 답이 되어 내가 복습하기 좋고 다른 사람 지식에도 도움되기 때문. 텍스트 분야에 한해서 [AI 믹서기] 라는 표현을 만들고 쓰고 싶다.

내 글을 AI 믹서기에 넣고 갈았다.

iOS & Swift - 스토리보드 이동 방법

1. 기본적인 방법

swift

Copy code
let storyboard = UIStoryboard(name: "StoryboardName", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "ViewControllerIdentifier") as! CustomViewController

2. 네비게이션 컨트롤러를 사용하여 이동

2.1. 현재 뷰 컨트롤러에서 이동

swift

Copy code
self.navigationController?.pushViewController(viewController, animated: true)

2.2. 싱글톤에 저장된 네비게이션 컨트롤러 포인터를 사용하여 이동

swift

Copy code
let storyboard = UIStoryboard(name: "StoryboardName", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "ViewControllerIdentifier") as! CustomViewController Singleton.shared.currentNavigationController?.pushViewController(viewController, animated: true)

3. 윈도우에서 뷰 컨트롤러 접근하여 이동

swift

Copy code
self.window?.visibleViewController?.navigationController?.setNavigationBarHidden(true, animated: false) self.window?.visibleViewController?.tabBarController?.tabBar.isHidden = true self.window?.visibleViewController?.navigationController?.pushViewController(viewController, animated: true)

4. 모달 형식으로 뷰 컨트롤러 표시

swift

Copy code
self.window?.visibleViewController?.present(viewController, animated: true, completion: nil)

위의 방법들을 사용하여 스토리보드에서 다른 뷰 컨트롤러로 이동할 수 있습니다. 상황에 맞는 적절한 방법을 선택하여 사용하시면 됩니다.

주의사항:

  • 스토리보드 파일 이름과 뷰 컨트롤러 식별자(Identifier)는 실제 프로젝트에 맞게 변경해야 합니다.
  • 커스텀 뷰 컨트롤러 클래스로 타입 캐스팅할 때는 해당 클래스가 정의되어 있어야 합니다.
  • 싱글톤이나 윈도우를 통해 접근할 때는 해당 객체가 올바르게 초기화되어 있는지 확인해야 합니다.

이러한 방법들을 활용하여 스토리보드 간의 이동을 원활하게 처리할 수 있습니다.

 

iOS에서의 다양한 뷰 컨트롤러 이동 방법

기본 설정

iOS 애플리케이션 개발에 있어서 뷰 컨트롤러 간의 이동은 필수적인 부분입니다. Swift와 iOS SDK를 사용하여, 사용자 인터페이스 간의 전환을 구현하는 방법은 여러 가지가 있습니다. 이 글에서는 주로 UINavigationController를 활용한 이동 방법과 윈도우를 통해 현재 보이는 뷰 컨트롤러를 변경하는 방법에 대해 다룹니다.

방법 1: UINavigationController 사용하기

  • 스토리보드 설정
    • 우선, UIStoryboard 객체를 사용하여 목적지 뷰 컨트롤러의 인스턴스를 생성합니다.
    swiftCopy code
    let storyboard = UIStoryboard(name: "TabMenu", bundle: nil) let viewController = storyboard.instantiateViewController(withIdentifier: "settings_sharing_code") as! SharingCodeController
  • 뷰 컨트롤러 이동
    • UINavigationController의 pushViewController 메서드를 사용하여, 생성된 뷰 컨트롤러로 이동합니다.
    swiftCopy code
    self.navigationController?.pushViewController(viewController, animated: true)

방법 2: 현재 보이는 뷰 컨트롤러에서 이동하기

  • 윈도우에서 현재 뷰 컨트롤러 찾기
    • 현재 보이는 뷰 컨트롤러를 찾아 navigationController의 속성을 수정하고, 새로운 뷰 컨트롤러로 이동합니다.
    swiftCopy code
    self.window?.visibleViewController!.navigationController?.setNavigationBarHidden(true, animated: false) self.window?.visibleViewController!.tabBarController?.tabBar.isHidden = true self.window?.visibleViewController!.navigationController?.pushViewController(viewController, animated: true)
    • 혹은 present 메서드를 사용하여 모달 방식으로 뷰 컨트롤러를 표시할 수 있습니다.
    swiftCopy code
    self.window?.visibleViewController!.present(viewController, animated: true, completion: nil)

이렇게 UINavigationController의 스택을 활용하거나, 현재 활성화된 윈도우에서 직접 뷰 컨트롤러를 조작하는 방법을 통해 iOS 애플리케이션 내에서 다양한 화면 전환을 구현할 수 있습니다. 이 방법들은 사용자에게 부드럽고 직관적인 인터페이스 전환 경험을 제공하는 데 도움이 됩니다.

//제주도에 관심이 많으신 듯.


Swift의 struct와 C에서의 struct는 유사한 구조를 가지고 있지만, 여러 중요한 차이점이 있습니다. 이 차이점들은 언어의 설계 철학과 기능성, 사용 용도에서 비롯됩니다.

C에서의 struct

  • 데이터의 집합: C에서 struct는 여러 데이터 항목(멤버 변수)을 하나의 단위로 묶는 방법을 제공합니다. 이러한 멤버 변수는 다양한 데이터 타입을 가질 수 있습니다.
  • 메모리 할당: C의 struct는 메모리 상에서 연속된 공간을 차지합니다. 멤버 변수들은 선언된 순서대로 메모리에 배치됩니다.
  • 값 타입: C에서 struct는 값 타입(Value Type)입니다. struct를 다른 변수에 할당하거나 함수에 전달할 때, 메모리 내의 실제 데이터가 복사됩니다.
  • 메서드 없음: C의 struct에는 메서드를 직접 포함할 수 없습니다. 대신, struct의 인스턴스를 매개변수로 받는 함수를 정의하여 기능을 구현할 수 있습니다.

Swift에서의 struct

  • 데이터와 기능의 캡슐화: Swift의 struct는 데이터(속성) 뿐만 아니라 기능(메서드)도 함께 캡슐화할 수 있습니다. 이는 struct를 사용하여 더 복잡한 동작을 쉽게 모델링할 수 있게 해줍니다.
  • 값 타입: Swift에서 struct 또한 값 타입입니다. 하지만 Swift는 struct, enum 및 기본 데이터 타입(int, double, string 등)에 대해 값 타입을 권장합니다. 이는 참조 카운팅 오버헤드 없이 효율적인 메모리 관리를 가능하게 합니다.
  • 상속 불가능: Swift의 struct는 상속할 수 없습니다. 이는 클래스와의 주요 차이점 중 하나입니다. 다형성을 달성하기 위해서는 프로토콜을 사용할 수 있습니다.
  • 멤버와이즈 초기화자: Swift의 struct는 자동으로 멤버와이즈 초기화자(Memberwise Initializer)를 제공합니다. 이 초기화자를 통해 각 속성을 초기화할 수 있으며, 모든 속성에 대해 명시적으로 초기값을 제공하지 않아도 됩니다(기본값이 있는 경우).

요약

C의 struct와 Swift의 struct는 기본적인 용도는 유사하지만, Swift의 struct는 메서드를 포함할 수 있고, 상속 대신 프로토콜을 사용하여 다형성을 구현하는 등의 차이점이 있습니다. Swift는 값 타입을 사용하여 참조 카운팅 오버헤드를 줄이고, 메모리 사용을 최적화하는 설계를 채택하고 있습니다.

 

C에서 상속 흉내 내기

비록 C 언어에서 직접적인 상속을 지원하지 않지만, 개발자들은 몇 가지 기법을 사용하여 상속과 유사한 효과를 낼 수 있습니다. 이러한 기법 중 하나는 첫 번째 멤버로 기반 struct를 포함하는 것입니다. 예를 들어

typedef struct {
    int baseProperty;
} Base;

typedef struct {
    Base base;  // 'Base' struct를 첫 번째 멤버로 포함
    int derivedProperty;
} Derived;

이 방법을 사용하면, Derived 타입의 변수가 Base 타입의 속성에 접근할 수 있게 됩니다. 또한, 함수 포인터를 struct에 포함시켜 메서드와 비슷한 패턴을 구현할 수 있으며, 이를 통해 다형성을 흉내 낼 수도 있습니다.

typedef struct {
    void (*functionPointer)(void);
} StructWithFunction;

하지만 이러한 접근 방법은 실제 객체 지향 프로그래밍 언어에서 제공하는 상속의 모든 이점을 제공하지는 않습니다. 특히, 타입 캐스팅, 가상 메서드, 오버라이딩 같은 고급 객체 지향 기능을 모방하기에는 한계가 있습니다.

결론

C 언어에서 struct를 사용한 상속은 언어의 기본 기능을 넘어서는 일종의 창의적인 해결책이며, 실제 객체 지향 프로그래밍의 깊이와 유연성에는 미치지 못합니다. 그럼에도 불구하고, C 언어의 강력한 기능과 더불어 이러한 기법들은 여전히 유용하게 사용될 수 있습니다.

#include <stdio.h>

// 함수 선언
void myFunction(void) {
    printf("Hello, I'm a function pointed to by a struct!\n");
}

// 구조체 정의
typedef struct {
    void (*functionPointer)(void); // 함수 포인터 멤버
} StructWithFunction;

int main() {
    // 구조체 인스턴스 생성
    StructWithFunction myStruct;
    
    // 함수 포인터에 myFunction 함수의 주소 할당
    myStruct.functionPointer = myFunction;
    
    // 구조체를 통해 함수 호출
    myStruct.functionPointer();
    
    return 0;
}

========== 사족 ===========

처가댁(성환), 제주도 드론 샷 //이번 주는 이 포스트가 조회수 1위를 했다.

여행 카테고리는 꾸준한 듯. 당연히 프로그래밍 보다 인기가 좋닼ㅋㅋ

처가댁이랑 제주도에서 찍었었던...

 

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

스토리보드 이동 방법  (0) 2019.02.14
제주도 항공 촬영  (0) 2019.01.19
userDefault 활용  (0) 2019.01.16
Practical Swift  (0) 2019.01.14
iOS UI 기초 - Swift UI  (2) 2019.01.03

[이 문서는 계속 업데이트 됩니다.]

native 장치, 외부 라이브러리, 오픈소스, 쓰레드 작업 등등 은 userDefaut 가 좋다. 512KB 를 넘지 않는 선에서 써야 한다.

그건 10만자 라고 생각하면 기억하기 쉽고, 각각의 디바이스 이고 개별 저장소임을 감안할 때 앱에서 느낌은 거의 무한한 공간으로 느껴진다. 

  1. ASCII 문자 (영문 알파벳, 숫자, 기본 구두점): 1 바이트
  2. 대부분의 유럽 언어, 중동 언어, 아프리카 언어의 문자: 2 바이트
  3. 한글, 한자, 일본어 등 아시아 언어의 문자: 3 바이트
  4. 이모지 및 특수 기호: 4 바이트

512KB는 512 * 1024 = 524,288 바이트입니다.

만약 모든 문자가 ASCII라면, 최대 524,288 문자를 저장할 수 있습니다. 524,288 바이트 / 1 바이트 = 524,288 문자

그러나 모든 문자가 한글이라면, 최대 174,762 문자를 저장할 수 있습니다. 524,288 바이트 / 3 바이트 ≈ 174,762 문자 (소수점 이하 버림)

실제 상황에서는 다양한 문자가 혼합되어 사용되므로, 저장할 수 있는 정확한 문자 수는 문자의 구성에 따라 달라집니다. 대략적으로는 다음과 같이 추정할 수 있습니다:

  • 주로 ASCII 문자를 사용하는 경우: 약 500,000자
  • 주로 유럽어, 중동어, 아프리카어 문자를 사용하는 경우: 약 250,000자
  • 주로 한글, 한자, 일본어 등을 사용하는 경우: 약 170,000자
  • 이모지와 특수 기호를 많이 사용하는 경우: 약 130,000자

따라서 512KB는 상당히 많은 양의 텍스트 데이터를 저장할 수 있지만, 데이터의 성격에 따라 실제로 저장할 수 있는 문자 수는 크게 달라질 수 있습니다.

대림산업 이제는 바뀐 DL E&C 에서 담당했던 before Service 앱에서 13만건 이상 한 방에 싱크해야 하는 상황에서의 오프라인 싱크 앱 경험으로 sqlite 는 뻑난다. 파일 생성 역시나 안정적이지 못했다. UserDefault야 이미 13만 건 * 데이터 필드 개수 * 각 필드별 문자수 계산 하면 한계를 아득히 넘어 버리는 수치이기에 쓸 수 있지도 않았다. sql 에 저장하면 읽는데도 어마어마한 시간이 걸렸었다. 해결 방법은 시간적 공간적 분할 외엔 없었다. 시간은 CPU, 공간은 메모리... 결국... 내가 썼던 책 그대로의 내용이다.(세속적으로 말하면 기본기는 알려주나 경험적 지식은 스스로 터득하라는 것) 왜냐면, 시간이 지나서 안 사실이지만. 타이틀만 중요시하며 딱히 중요하지도 않은 지식을 공유하며 그것이 아닌 그 누군가에게도 고마워하지 않는 세상이라는 것을 알아버렸지 때문일까. 혹은, 그렇게 된 세상, 문화를 바로 잡기 위해서 필드의 지식은 필드에 그대로 남겨두고 싶어서일까. 그래도 공부 하고자 하는 이들을 위한 발자취는 남겨둔다. 덜 고생하시라고.

 

UserDefaults는 iOS 앱에서 간단한 데이터를 저장하고 검색하는 데 사용되는 편리한 메커니즘입니다. 그러나 모든 상황에 적합한 것은 아닙니다. UserDefaults를 사용하여 데이터를 저장하고 전송하는 것의 장단점과 제한 사항은 다음과 같습니다.

장점:

  1. 간편성: UserDefaults는 key-value 쌍을 사용하여 데이터를 저장하고 검색하는 간단한 방법을 제공합니다.
  2. 빠른 액세스: UserDefaults에 저장된 데이터는 빠르게 액세스할 수 있습니다.
  3. 영구 저장: UserDefaults에 저장된 데이터는 앱이 종료되거나 기기가 재부팅되어도 유지됩니다.

단점:

  1. 제한된 데이터 유형: UserDefaults는 주로 기본 데이터 유형(String, Int, Bool 등)과 일부 컬렉션 유형(Array, Dictionary)만 지원합니다. 사용자 정의 객체를 저장하려면 Codable 프로토콜을 준수해야 합니다.
  2. 제한된 저장 공간: UserDefaults는 대량의 데이터를 저장하기에 적합하지 않습니다. Apple은 UserDefaults에 저장되는 데이터를 약 512KB로 제한할 것을 권장합니다.
  3. 보안 고려 사항: UserDefaults에 저장된 데이터는 암호화되지 않으므로 중요한 정보를 저장하는 데 적합하지 않습니다.

제한 사항 (Limits):

  1. 데이터 크기: Apple은 UserDefaults에 저장되는 데이터를 약 512KB로 제한할 것을 권장합니다. 이 제한을 초과하면 앱의 성능에 영향을 줄 수 있습니다.
  2. 데이터 유형: UserDefaults는 주로 기본 데이터 유형과 일부 컬렉션 유형만 지원합니다. 사용자 정의 객체를 저장하려면 추가 작업이 필요합니다.

외부 라이브러리 및 API와의 상호 작용:

  • 외부 라이브러리나 API에서 받은 데이터를 UserDefaults에 직접 저장하는 것은 일반적으로 권장되지 않습니다. 대신, 데이터를 적절한 데이터 모델로 변환한 후 필요한 경우 UserDefaults에 저장하는 것이 좋습니다.
  • 이미지나 비디오와 같은 큰 데이터는 UserDefaults 대신 파일 시스템이나 Core Data와 같은 다른 저장 메커니즘을 사용하는 것이 좋습니다.

요약하면, UserDefaults는 간단한 데이터를 저장하고 전송하는 데 유용하지만, 대량의 데이터나 복잡한 객체를 다룰 때는 한계가 있습니다. 데이터의 유형과 크기에 따라 적절한 저장 메커니즘을 선택하는 것이 중요합니다.

 

@State private var udfirstArg = UserDefaults.standard.string(forKey: "CameraViewfirstArg")

var udfirstArg = UserDefaults.standard.string(forKey: "CameraViewfirstArg")

UserDefaults.standard.set(self.firstArg, forKey: "CameraViewfirstArg")

//            let savingLocation = "gs://" + (self.udfirstArg ?? "") + "/" + "230830.jpeg"

 

 

func makeUIViewController(context: Context) -> HjHCameraViewController {

        print("func makeUIViewController(context: Context) -> HjHCameraViewController {")

        UserDefaults.standard.set(self.firstArg, forKey: "CameraViewfirstArg")

        UserDefaults.standard.set(self.secondArg, forKey: "CameraViewSecondArg")

        UserDefaults.standard.set(self.thirdArg, forKey: "CameraViewThirdArg")

        

        let vc = HjHCameraViewController()

        vc.modalPresentationStyle = .fullScreen

        return vc

    }

 

 

 

 

//

//  HjhCameraView.swift

//  App

//

//  Created by Junho HA on 2023-04-30.

//

 

import SwiftUI

 

 

struct HjhCameraView: UIViewControllerRepresentable {

    

    let firstArg : String

    let secondArg : String //let secondarg = $item.businessNumber

    let thirdArg : String //처방월_년

    

    typealias UIViewControllerType = HjHCameraViewController

    

    func makeUIViewController(context: Context) -> HjHCameraViewController {

        print("func makeUIViewController(context: Context) -> HjHCameraViewController {")

        UserDefaults.standard.set(self.firstArg, forKey: "CameraViewfirstArg")

        UserDefaults.standard.set(self.secondArg, forKey: "CameraViewSecondArg")

        UserDefaults.standard.set(self.thirdArg, forKey: "CameraViewThirdArg")

        

        let vc = HjHCameraViewController()

        vc.modalPresentationStyle = .fullScreen

        return vc

    }

    

    func updateUIViewController(_ uiViewController: HjHCameraViewController, context: Context) {

        // Updates the state of the specified view controller with new information from SwiftUI.

        

    }

    

}

 

 

 

            Section {

                Toggle(isOn: $continuousTakePicture) {

                    Text("연속 촬영")

                }

                Button(action: {

                    print("EDIEDI")

                    let dateFormatter = DateFormatter()

                    dateFormatter.dateFormat = "MM_yyyy" // "MMMM yyyy" will give you the full month name and the year

                    

                    if let window = UIApplication.shared.windows.first {

                        let subject = "\($item.summary.wrappedValue)_\($item.owner_id.wrappedValue)"

                        let body = "_\($item.owner_id.wrappedValue)_거래처명:\($item.summary.wrappedValue)"

                        //                        let thirdarg = dateFormatter.string(from: date)

                        let thirdarg : String = String(month) + "_" + String(year)

                        print("hjhdate : \(dateFormatter.string(from: date))")

                        //                        let secondarg = dateFormatter.string(from: date)

                        let secondarg:String = $item.businessNumber.wrappedValue

                        window.rootViewController = UIHostingController(rootView: HjhCameraView(firstArg: $item.summary.wrappedValue, secondArg: secondarg, thirdArg: thirdarg))

                        window.makeKeyAndVisible()

                    }

                }, label: {

                    HStack {

                        Spacer() // 버튼 내부에서 텍스트를 중앙에 위치시키기 위해 사용

                        Image(systemName: "camera")

                            .imageScale(.large)

                            .foregroundColor(.white) // 아이콘 색상 조정

                        Text("EDI 촬영")

                            .fontWeight(.bold)

                            .foregroundColor(.white) // 텍스트 색상 조정

                        Spacer() // 버튼 내부에서 텍스트를 중앙에 위치시키기 위해 사용

                    }

                    .padding() // 버튼 내부 여백 추가

                    .background(LinearGradient(gradient: Gradient(colors: [Color.blue, Color.purple]), startPoint: .leading, endPoint: .trailing)) // 그라디언트 배경 적용

                    .cornerRadius(10) // 모서리 둥글게

                    .shadow(radius: 5) // 그림자 효과 추가

                })

                .frame(maxWidth: .infinity) // 최대 너비 설정

                

                // "SODN으로 자동 전송" 토글 상태에 따라 조건부 렌더링

                if settingActivated {

                    Button(action: {

                        checkCameraAccess()

                        self.isShowingImagePicker = true

                        //                        self.uploadState = .idle

                        DispatchQueue.main.asyncAfter(deadline: .now() + 1) {

                            self.uploadState = .idle

                            // 업로드 성공 후 필요한 UI 초기화 로직을 여기에 추가

                            // 예: 선택된 이미지를 초기화한다거나, 성공 메시지를 표시하는 등

                        }

                        

                    }) {

                        Text("갤러리에서 사진 선택")

                            .frame(maxWidth: .infinity)

                            .padding()

                            .background(LinearGradient(gradient: Gradient(colors: [Color.purple.opacity(0.8), Color.blue.opacity(0.8)]), startPoint: .leading, endPoint: .trailing))

                            .foregroundColor(.white)

                            .cornerRadius(10)

                            .shadow(radius: 5)

                    }

                    .padding(.horizontal)

                    .fullScreenCover(isPresented: $isShowingImagePicker, onDismiss: loadImage) {

                        // ImagePicker 뷰 표시

                        HjhImagePicker(selectedImage: $selectedUIImage)

                    }

                    

                }

            }

            

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

스토리보드 이동 방법  (0) 2019.02.14
제주도 항공 촬영  (0) 2019.01.19
C의 struct와 Swift 의 struct  (0) 2019.01.19
Practical Swift  (0) 2019.01.14
iOS UI 기초 - Swift UI  (2) 2019.01.03

This document will be continuously updated.

문서가 너무 많아져서 30개로도 압축이 안되기 때문에 구글 문서로 모두 통합하여 업데이트 하기로 했다.

https://docs.google.com/document/d/1XeuDIhtXQ0UypbAG0yRRlsx1K0-LTWJaJr25snDvxRo/edit?usp=sharing

 

hjh_Swift

 

docs.google.com

 

뭘하던, 요구사항 정의와 도메인 정의, 데이터 저장 방법이 끝나야 하지. ㅡㅡ; 누더기 코드는 여기에만 두고 실제로는 모두 삭제한다. 한 달 쓰는(함께 일하는) 고가의 웹 개발자를 잘못 뽑았더니 데이터 정의를 못해서 ㅠㅠ 우왕좌왕 하다 결국 내가 하는... 그러나 생각해보면 DB 담당자가 없으면 웹 개발자가 해야 한다는 인식이 잘못되었다. 서비스에서 가장 많은 %를 개발하고 있는 개발자가 데이터 정의를 하는게 맞다는 교훈을 얻은 경험이었다.

print("Auth.auth().currentUser!.uid = " + (Auth.auth().currentUser?.uid ?? ""))

            print("app.current user = " + (app.currentUser?.id ?? ""))

            //            print("(Int(Date.timeIntervalSinceReferenceDate * 1000))/fromData/(imageURL.lastPathComponent) = " + "/\(Int(Date.timeIntervalSinceReferenceDate * 1000))/fromData/\(imageURL.lastPathComponent)")

//            let addr_firebase_storage = ViewsAppConfiguration.shared.addr_firebase_storage

            let storage = Storage.storage(url: addr_firebase_storage)

            //            let savingLocation = "gs://" + (self.udfirstArg ?? "") + "/" + "230830.jpeg"

            let thirdWords = self.udthirdArg as Any

            let stringValue = (thirdWords as? String) ?? "Default Value"

            print("Value as String: \(stringValue)")

            

            let businessNumber = self.udsecondArg

            let businessNumberWithoutDashes = (self.udsecondArg ?? "").replacingOccurrences(of: "-", with: "")

            // Now, businessNumberWithoutDashes contains the business number without dashes

            

            let savingLocation = addr_firebase_storage + "2023/" + (app.currentUser?.id ?? "") + "/" + (self.udfirstArg ?? "") + "/" + "/\(Int(Date.timeIntervalSinceReferenceDate * 1000))" + "_" + stringValue + "_" + businessNumberWithoutDashes + ".jpg"

            let storageRef = storage.reference(forURL: savingLocation)

            print("HJH_UserDefault logs(self.udfirstArg) = ", self.udfirstArg as Any)

            print("HJH_UserDefault logs(self.udsecondArg) = ", self.udsecondArg as Any)

            print("HJH_UserDefault logs(self.udthirdArg) = ", self.udthirdArg as Any)

            

            let metadata = StorageMetadata()

            //            metadata.contentType = "ProfileImage/jpeg"

            metadata.contentType = "image/jpeg"

            

핵심은 savingLocation 이다. 보통은 파일명 해시화가 가장 좋았지만 한 번(1초 내)에 쓰레드에서 1000개씩 돌린것을 구글과 몽고DB, 아마존에 보내다  보니 DB 메타데이터랑 꼬이는 현상이 있어 주요 정보는 줄이고, 파일명 자체로 정보를 보내며 싱크를 맞추기로 했다.

var udfirstArg = UserDefaults.standard.string(forKey: "CameraViewfirstArg") 유저 디폴트 키로 오픈 소스와 데이터를 연결한다. 

let savingLocation = addr_firebase_storage + "2023/" + (app.currentUser?.id ?? "") + "/" + (self.udfirstArg ?? "") + "/" + "/\(Int(Date.timeIntervalSinceReferenceDate * 1000))" + "_" + stringValue + "_" + businessNumberWithoutDashes + ".jpg"

가독성이 떨어질지도 모르지만 혼자 개발하다 보니 나에게는 이게 가장 가독성이 높다. 그리고 잘 짠다는 것은 코드 조각을 공개해도 주요 정보는 공개 되지 않는 시큐리티 정보 분할 방식 코딩이 잘 짠다는 것이다. 라인 맞출 필요 없이 formatter면 충분하고 실제 바이트 코드는 모두 리니어 하다. 사람의 두뇌 능력이 떨어지니 다 떨어뜨려서 이해를 해야하는 것 뿐.

주니어 개발자를 뽑으면 늘 리팩토링만 하다가 정작 신규 피처를 개발 못하고 욕하면서 나가며, 자신이 뭘 개선했니 마니 한다. 그래서 요즘엔 주니어 개발자 뽑으면 소스 공유 안하고 6개월 정도 똑같은 프로젝트 만들어 보라고 하고 시간을 준다. 그러면 스스로 굉장히 공부를 많이 한 줄 알고 6개월 동안 개고생하다가 배터리 다 되고, 본인 포트폴리오로 해서 이직을 한다. 이런 케이스를 한 6명 정도 겪다 보니 돈을 최소 2배 주더라도 시니어 개발자를 쓴다. 시니어 개발자와 커뮤니케이션은 간단하다. 그냥 전체를 떼 주고 VOC, 요구사항이나 기능, 퍼블리싱 시기 관련해서만 이야기를 한다. 개발 관리가 얼마나 편한지 깨닫게 되는 시간이다. 그리고 나도 개발자다보니 신규 개발 기술이나 어떤 것은 도전적인 것이고 어떤 것은 편한 것인지 이야기 하며, 좀 더 친해지다보면 우리 휴가 보전을 위해 좀 구린 개발자들이 모인 집단과 비교해서 충분한 개발 속도를 확보한 상태에서 개발 속도를 조절한다. 장기 휴가 아닌 장기 휴가를 가진다. 그게 큰 규모의 기업이던 작은 규모의 기업이던 스톡홀더나 경영자나 개발은 전혀 못하면서 자신이 뛰어난 관리자라고 착각하는 사람들을 대하는 방식이었고, 내가 대표가 되고 나서도 왠만해서는 경쟁력이 나오니 너무 아등바등 하지는 않는다. 시니어만 모인 조직만의 장점이다.

 그러나 가끔 서로 얼굴 보며 너무 재미 없다고 느낄 때쯤 개발자를 찾으면 오로지 인성만 보고 뽑는다. 개발 실력을 정말 어릴적 부터 닦아서 주변 사람들보다 개발을 너무 잘해서 나오는 자신감과 그런 실력으로 주변 사람들의 칭찬에 길러져서 흡사, 온실속의 밝은 화초가 아니라면, 사실 다 고만고만하게 보이는게 사실이다.

인성을 보는 방법은 쉽다. 에베레스트를 올랐던, 다른 분야에서 1등을 했었던. 정말 뭔가 열심히 해서 결과를 내려고 부단히 노력했었던 사람이라면 또 그것을 다른 사람을 위한 행동이었다면 개발 분야에서도 똑같이 적용된다.

우리 분야는 학문적으로 너무 들어가는 깊이를 항상 경계하기 때문에 그 경계가 풀리면 무한히 재미있는 세계가, 또 그런 세계가 여러개 기다리고 있다. 단점은 시간이 너무 빨리 가서 어느 순간 늙어 있는 자신을 발견하면 좀 벙찐다.

 

 

===== 화사 첨족 ==========

제주도 차 가지고 가는 방법

 

배 출발 후 바로 쓴다. 배타고 나서 할게 없다. ㅠ

 

수원에서 외롭게 운전해서 간다. 12시(자정) 출발했는데 첫번째 휴게소에서 잠들어서 두시까지 잤다.

 

 

 

 

 

다섯시 반에 도착. 두시간 잔거 빼면 세시간 반 걸린다. 고속도로로 다 이어져 있고 평일인걸 감안(정체현상 제로) 휴게소 시간 합하면 다섯시간 반 걸린다고 보자.

 

 

일곱시부터라고 되어있지만 여섯시 반부터 차를 싣는다. 걍 운전하고 들어가면 된다.

 

참고로 여수 엑스포 옆에 여객 터미널이 있다. 예약 안하고 왔어도 일단 차부터 싣는다. 난 예약했다. 평일은 예약 안해도 될 것 같다.(주말은 경험이 없으니 모름) 차를 배에 선적하고 화면에 보이는 사무실로 가서 계산 한다.(예약으로 결재한 사람도 무조건 들러야 한다)

 

 

 

 

 

이층 주차장이 안에 있다고 보면 된다. 안내하시는 분들이 많으니 가라는데로 가서 주차하면 된다. 바퀴 결박해주신다.

 

원래 가격은

 

이거다. 그런데 6월 차량 가지고 온 탑승객은 일등실 업글 이벤트를 했다. 땡잡음 ㅋㅋㅋ 일등실이랑 특등실은 2인 이상이기 때문에 혼자오면 2등실을 잡는게 맞다.(뭐 돈 ㅈㄹ해도 되긴 함)

 

뱃사람들 격하지만 인심은 잘 안다. 지나가면서 눈썰미를 발휘하니 이벤트 아니라도 어르신들은 다 업글 해주는 듯하다.(하지만 말할 수 없다는... 진짠가?)

 

배는 참 크다. 내부는

 

4인실이 이렇다. 밤새 운전했으니 자고 일어나면 제주도일 듯. 레스토랑도 있고 화장실에 비데도 있고 기타 등등 적을게 많다. 그러나 {제주도에 차 가져가기}는 충분히 이야기 한 듯. 참고로 세월호 여파로 사라진 해운업 회사 많다. 블로그 포스팅 믿지 말고 예약하려면 직접 선사와 연락해서 회사가 있는지 확인해야 한다. 여수보다 완도가 제주도에 가깝지만 운전하기가 싫었다.(여수 엑스포가 있으니 도로가 잘 되어있을거라 판단함) 고향 부산에서는 제주까지 7~8 시간 이라고 했다. 완도는 세네시간, 여수는 다섯 시간이라더라.

 

참고로 이 정도 파도에서는 어린이와 온다고 해도 배 멀미 걱정 안해도 되겠다. 흔들림은 거읭 없다. 시동 걸어놓고 정차된 자동차 안에 있는 기분.

 

이등실엔 이불이 없다 ㅠㅠ

 

 

 

 

밖에는 커다란 재떨이식 쓰레기통이 있다.

 

애연가 분들은 담배불 붙이기는 힘들어도 좋을 듯. 터보라이터로 준비하시길.

 

 

 

 

전화도 계속 잘 터진다. 대한민국만세. LTE 는 조금 느린 기분.

 

 

 

 

 

제주항으로 도착합니다. 두시에 항구 근접!

 

 

정박 직전에 밖에서 구경하고팠는데 엄청난 배기가스가 바람을 이용하여 얼굴을 때려 안으로 들어갔다.

 

 

 

 

차를 가지고 가실 분께 도움되셨길.

 

 

 

 

http://www.hanilexpress.co.kr/external/ticket/login?returnurl=reservation

Hanilexpress



www.hanilexpress.co.kr

 

 

2016 9월 업데이트

 

 

 

 

제주에서 여수로 가는 것은 10시 도착이더라. 목포 도착으로 하면 6시 30분쯤 온다고 한다. 똑같이 제주 4 부두고 12시 40분에 와서 차량 싣고 면세점 쇼핑하고 탔다. 입석인데 더 비쌌다.

 

그래도 제주 생활 정리하고 바다보고 바람을 맞으며 가는 이 길이 마냥 즐겁다. 경기도 계신 분들께는 목포로 복귀를 추천 드린다. 휴게실에 책 놔두고 옆에 못 앉게 하는 사람들 많던데.... 쫌...

 

 

 

 

바람이 워낙 쎄서 몸이 날아갈 것 같은데 덩달아 꿀꿀한 기분도 함께 날아가는 기분.

 

 

 

 

두시에 출발하니 골드스텔라가 들어온다. 골드스텔라는 네시 반 출발에 열시 여수 도착이라 수원까지 운전하려면 빡실듯

 

 

 

 

바다를 보다 두시간 20분쯤 지나면 풍경이 펼쳐진다.

 

 

7시에 도착. 보통은 6시 반 도착이라고 한다. 귀경길은 서해안 고속도로 타다가 공주쪽으로 빠졌다가 경부타고 왔는데 휴게소에서 밥 먹고 집에 11시에 집에 도착했다.

 

 

 

 

목포 출발 제주 도착은 밤에 출발한다고 들었다.

 

 

 

 

혹 제주도에 다시 차 가져갈 일 있으면 여수와 목포를 잘 이용하려고 한다.

 

 

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

스토리보드 이동 방법  (0) 2019.02.14
제주도 항공 촬영  (0) 2019.01.19
C의 struct와 Swift 의 struct  (0) 2019.01.19
userDefault 활용  (0) 2019.01.16
iOS UI 기초 - Swift UI  (2) 2019.01.03

[이 포스트는 계속 업데이트 합니다.] --> 중단되었습니다. 보통 포스팅이 중단되면 관련 기술이 완전히 사장되었던지, 다른 포스트에 version 2가 있다는 의미 입니다.

 

2024년 1월 1일의 결정 : 단 하나의 프로젝트는 제외하고, 내가 혼자서 만드는 모든 프로젝트 SwiftUI 로 전격 교체!

내가 혼자서 만든 TakeTouch 는 바꾸지 못한다(내재화한 오픈소스가 방대하여 아마 8명 팀이 해도 1년은 넘게 걸릴거라 생각한다.)

 

 

 

==== 지난 글 ====

 

iOS에 대한 관심이 높아진 것인지? ^^;; 인기 급 상승하네. 이 포스팅은 내가 봐도 참 알차다.

---------------------------------------------------------------



1. 폰트 지정


label.font = UIFont.init(name: "NanumSquareOTFL", size: 16)

폰트 이름은

for family in UIFont.familyNames.sorted() {
    let names = UIFont.fontNames(forFamilyName: family)
    print("Family: \(family) Font names: \(names)")
}

샌프란시스코 폰트 다운로드(sf compact, sf pro)
https://developer.apple.com/fonts/

Fonts - Apple Developer
developer.apple.com 

나머진

https://brunch.co.kr/@jade/203

저작권 걱정없는 무료 한글폰트


한글날 기념 무료 한글 글꼴 포함 | 이제 매년 한글날이 되면 많은 기업들이 한글폰트를 내는 것이 좋은 홍보의 수단이 되는 듯 하다. 최근에 누구나 이용할 수 있도록 공개된 무료 한글 공개 폰트(글꼴)들을 정리해 보았다. 유료가 아니어도 예쁜 폰트가 참 많아졌다. 1. 네이버 나눔한글폰트 http://hangeul.naver.com/2016/nanum 가장 많이 사용하는 무료 한글 폰트가 아


brunch.co.kr/@jade/203 

2. UINavigationBar

색상 바꾸기

internal extension UIColor {
    convenience init(red: Int, green: Int, blue: Int) {
    assert(red >= 0 && red <= 255, "Invalid red component")
    assert(green >= 0 && green <= 255, "Invalid green component")
    assert(blue >= 0 && blue <= 255, "Invalid blue component")
    self.init(red: CGFloat(red) / 255.0, green: CGFloat(green) / 255.0, blue: CGFloat(blue) / 255.0, alpha: 1.0)
}

convenience init(rgb: Int) {
    self.init(
    red: (rgb >> 16) & 0xFF,
    green: (rgb >> 8) & 0xFF,
    blue: rgb & 0xFF
)}


override func viewDidLoad() {

    super.viewDidLoad()
    let navigationBarAppearance = UINavigationBar.appearance()
    navigationBarAppearance.tintColor = UIColor(rgb:0xffffff)
    navigationBarAppearance.barTintColor = UIColor(rgb:0x00aaee)
    navigationBarAppearance.backgroundColor = UIColor(rgb:0x00aabb)
}

숨기기

override func viewWillAppear(_ animated:Bool) {
    super.viewWillAppear(animated)
    UINavigationBar.appearance().isHidden = true
    self.navigationController!.isNavigationBarHidden = true
    self.navigationController?.navigationBar.isHidden = true
}

override func viewWillDisappear(_ animated: Bool) {
    super.viewWillDisappear(animated)
    UINavigationBar.appearance().isHidden = false
}

3. iPhone Screen Resolution enum

//Device Native Resolution(Pixels) UIKit Size (Points) Native Scale factor UIKit Scale factor
//iphone XS Max 1125 x 2436 414x896
//iphone XS 1242 x 2688 375 x 812
//iPhone XR 828 x 1792 414x896
//iPhone X 1125 x 2436 375 x 812 3.0 3.0
//iPhone 8 Plus 1080 x 1920 414 x 736 2.608 3.0
//iPhone 8 750 x 1334 375 x 667 2.0 2.0
//iPhone 7 Plus 1080 x 1920 414 x 736 2.608 3.0
//iPhone 6s Plus 1080 x 1920 375 x 667 2.608 3.0
//iPhone 6 Plus 1080 x 1920 375 x 667 2.608 3.0
//iPhone 7 750 x 1334 375 x 667 2.0 2.0
//iPhone 6s 750 x 1334 375 x 667 2.0 2.0
//iPhone 6 750 x 1334 375 x 667 2.0 2.0
//iPhone SE 640 x 1136 320 x 568 2.0 2.0
//iPad Pro 12.9-inch
//(2nd generation) 2048 x 2732 1024 x 1366 2.0 2.0
//iPad Pro 10.5-inch 2224 x 1668 1112 x 834 2.0 2.0
//iPad Pro (12.9) 2048 x 2732 1024 x 1366 2.0 2.0
//iPad Pro (9.7-inch)1536 x 2048 768 x 1024 2.0 2.0
//iPad Air 2 1536 x 2048 768 x 1024 2.0 2.0
//iPad Mini 4 1536 x 2048 768 x 1024 2.0 2.0

extension CGPoint : ExpressibleByStringLiteral {
    public init(stringLiteral value: String) {
    let point = CGPointFromString(value)
    self.init(x: point.x, y: point.y)
    }
}

enum iPhoneScreen : CGPoint {
    case iPhone_X_XS = "{375, 812}"
    case iPhone_XSMax_XR = "{414, 896}"
    case iPhone_8Plus = "{414,736}"
    case iPhone_8_7_6sPlus_6s_6Plus_6 = "{375,667}"
    case iPhone_7_Plus = "{414, 736}"
    case iPhone_SE = "{320, 568}"
    case iPad_Pro_129 = "{1024, 1366}"
    case iPad_Pro_105 = "{1112, 834}"
    case iPad_Pro97_iPadAir2_iPadMini4 = "{768, 1024}"
}

쓸 때는 CGPoint 자체를 써도 되고, iPhoneScreen.iPad_Pro_129.rawValue.x 이렇게 써도 된다.



4. AUTOLAYOUT 맛보기

다음은 각 기 다른 회사의 채용 공고에 있는 iOS 개발자 자격 사항이다.


1. Objective-C, Swift, Auto Layout, Storyboard, 객체지향 등의 이해도가 있으신 분
2. swift, objective-c, auto layout
3. Swift , storyboard, auto layout 사용 경험자

Android 개발할 때는 FrameLayout 보다 RealativeLayout를 많이 쓰니 사실상 auto layout이 맞으나, 결국 아이콘은 xhdpi, xxhdpixxxhdpi 뿐 아니라, sw600dp, sw720dp 등 기억나는 것만 10개 이상의 layout 폴더에 각기 다른 pixel의 아이콘을 넣었었다. 그리고 기종을 체크해서 코드로 레이아웃을 다르게 구현했었다. 왕도는 없더라. 그래야 깨끗하게 나오니까. 삼성폰의 번들 아이콘이기도 했으나...

스타트업이나 중소기업을 보면 Andorid 보다 iOS로 시작하는 경우가 많다. 7~8년 전 내가 알던 안드로이드 폰 종류가 7000천 가지였는데 지금은 만가 지도 더 될 것 같다. 그래서 트러블 슈팅에서 오는 비용을 줄이기 위해 screen density가 단순한 iOS 먼저 개발하고 성공하면 Android를 하는 경우가 많았다. 같이 개발하더라도 Auto layout를 선호한다.

Android에서 autolayout 이 relative 스타일이라면, iOS는 constratins라 하겠다.


Constraints를 제대로 알려면


https://developer.apple.com/documentation/uikit/nslayoutconstraint





NSLayoutConstraint - UIKit | Apple Developer Documentation



developer.apple.com 
부터 보면 되겠지만


좀 더 쉽게 접근하려면 UITableView를 만들고 그 Cell을 코드로 구현하면 된다.


기초는 여기...
https://www.ioscreator.com/tutorials/prototype-cells-table-view-ios-tutorial-ios10
Prototype Cells in Table View iOS Tutorial


When using Table Views inside the Storyboard, prototype cells can be used to create some predefined or even custom layouts of the Table View Cells. In this tutorial we will create a basic Prototype cell, which includes an (optional) image and a title. This


www.ioscreator.com 











트러블 슈팅 팁.


unable to dequeue a cell with identifier
스토리 보드에서 Table View Cell의 Identifier 설정이 맞지 않는 경우.
let cell = tableView.dequeueReusableCell(withIdentifier: "여기", for: indexPath)
여기와 Identifier가 일치해야 한다.


굳이 cell을 붙이지 않더라도 TableView만 붙인 상태에서 테스트해 볼 수 있으니,
let cell: UITableViewCell = UITableViewCell(style:UITableViewCellStyle.subtitle, reuseIdentifier: "Cell")
이 코드로 테이블 뷰가 잘 보이는지 확인할 수 있다.


Could not cast value of type 'UITableViewCell'
self.tableView.register(CustomTableViewCell.self, forCellReuseIdentifier: "여기")

즉, Constraints 만드는 방법은 2가지

contentView.addConstraint(NSLayoutConstraint(item: value, attribute: NSLayoutAttribute.centerY, relatedBy: NSLayoutRelation.equal, toItem: self.contentView, attribute: NSLayoutAttribute.centerY, multiplier: 1, constant: 0))


contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|-[title]-[value]-|", options: [], metrics: nil, views: viewsDict))


다양한 옵션은

https://stackoverflow.com/questions/25413239/custom-uitableviewcell-programmatically-using-swift


Custom UITableViewCell programmatically using Swift


Hey all I am trying to create a custom UITableViewCell, but I see nothing on the simulator. Can you help me please. I can see the label only if I var labUserName = UILabel(frame: CGRectMake(0.0, 0...


stackoverflow.com 
를 참고하고 xcode의 autofix 기능을 이용하면 최신 코드로 변경이 가능하다.


맛을 봤다면, 이제 스냅킷을 쓰자.
https://github.com/SnapKit/SnapKit


SnapKit/SnapKit


A Swift Autolayout DSL for iOS & OS X. Contribute to SnapKit/SnapKit development by creating an account on GitHub.
github.com 



-
------------------- 나의 구글 블로그 글 옮겨서 통합 ------------------

 

Android에서 Androidmanifest.xml이 설계도 이 듯, iOS에서는 info.plist 가 비슷한 역할을 한다.

info.plist의 Launch screen interface file base name은 런치 스크린을

Main storyboard file base name은 처음 실행할 스토리 보드 이름을 지정한다.

 

스토리 보드도 xml 파일이다. 

 

<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">

 

처음 실행되는 스토리 보드는 initialViewController 체크박스에 체크를 해야 한다. 물론, GUI로 보여주지만 결국, 다음과 같이  XML이 바뀌는 것이다.

 

<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="14313.18" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES" initialViewController="QfJ-J6-o4q">

 

스토리 보드에서는 ViewController를 지정할 수 있다. 이제 어떻게 코드가 흐르는지 알 수 있다.

 

autolayout을 위해 스토리 보드에서 constraints를 지정할 수 있지만, 왜 굳이 코드로 해야 하는지는 깊게 설명하지 않고 싶지만 굳이 말하자면, 큰 프로그램이 되는 환경 속에서 UI 작업을 지속적으로 경험해보면 코드로 할 필요성을 느낄 수밖에 없다. 애플이 편하게 MVC로 만들어주긴 했지만 말이다.(안드로이드는 무조건 xml이지...)

개발자는 항상 플랫폼 테스터도 되기 때문에 (본디 디버깅은 재미있지만) 이후 재미없는 디버깅을 하게 될 가능성이 크다. 서버와의 싱크를 맞추려니 콜백 지옥에 빠지고 그 지옥에서 나로려니  MVC를  MVVM으로 바꿔야 한다. 결론은 코드라는 이야기.

 

초유의 관심사 AutoLayout, 1편에서 snapkit을 쓰자고 했다.

 

snapkit은 pod으로 설치하고

  pod 'SnapKit', '~> 4.0.0'

import SnapKit 만 하면 UIView와 그 하위 친구들에게 바로 쓸 수 있다.

 

var firstGroup : UIView 던

var btnVarious : UIButton이던

var iqr : UILabel이던

 

쉽게 constraints를 지정할 수 있다.

 

firstGroup.snp.makeConstraints { (make) in

            make.width.equalToSuperview()

            make.height.equalTo(29)

            make.left.equalTo(0)

        }

 

btnVarious.snp.makeConstraints { (make) in

            make.width.equalTo(29)

            make.height.equalTo(29)

            make.right.equalTo(btnQuestionMark.snp.left).offset(-1)

        }

 

iqr.snp.makeConstraints { (make) in

            make.width.equalTo(110)

            make.height.equalTo(28)

            make.left.equalToSuperview().offset(22)

        }

 

storyboard에서 만드는 것처럼 원하는 view에 add를 먼저 하고 제약사항을 만든다. 붙인 view가 바로 superview다. offset은 + 값과 -값이 있고 둘은 서로 반대 방향이다. 좌표계를 바꿀 수 있지만 보통은 좌측 상단이 0,0이니 어디가 + 방향 인지는 쉽게 알 수 있다.

 

     labelAmount.snp.makeConstraints { (make) in

            make.width.equalTo(52)

            make.height.equalTo(17)

            make.left.equalTo(amount.snp.left)

            make.top.equalTo(amount.snp.bottom)

        }

값을 직접 지정할 수동 있고, 다른 view의 snp를 얻어와서 맞춰줄 수도 있다.

 

그럼 어떤 값 지정이 가능할까? public class ConstraintMaker를 보면

    public var left: ConstraintMakerExtendable {

    public var top: ConstraintMakerExtendable {

    public var bottom: ConstraintMakerExtendable {

    public var right: ConstraintMakerExtendable {

    public var leading: ConstraintMakerExtendable {

    public var trailing: ConstraintMakerExtendable {

    public var width: ConstraintMakerExtendable {

    public var height: ConstraintMakerExtendable {

    public var centerX: ConstraintMakerExtendable {

    public var centerY: ConstraintMakerExtendable {

    public var baseline: ConstraintMakerExtendable {

    public var lastBaseline: ConstraintMakerExtendable {

    public var firstBaseline: ConstraintMakerExtendable {

    public var leftMargin: ConstraintMakerExtendable {

    public var rightMargin: ConstraintMakerExtendable {

    public var topMargin: ConstraintMakerExtendable {

    public var bottomMargin: ConstraintMakerExtendable {

    public var leadingMargin: ConstraintMakerExtendable {

    public var trailingMargin: ConstraintMakerExtendable {

    public var centerXWithinMargins: ConstraintMakerExtendable {

    public var centerYWithinMargins: ConstraintMakerExtendable {

    public var edges: ConstraintMakerExtendable {

    public var size: ConstraintMakerExtendable {

    public var center: ConstraintMakerExtendable {

    public var margins: ConstraintMakerExtendable {

    public var centerWithinMargins: ConstraintMakerExtendable {

 

이런 값들이 있고 스토리 보드를 쓰다 보면 거의 대부분 알 수 있는 것들이다. 주의할 점은 제약 사항 충돌이다. left와 right 제약 사항을 동시 지정해보면 쉽게 알 수 있을 것이다.

 

SnapKit의 원리는 간단하다. 다음과 같이 Int Values를 array에 넣고 나중에 for 문을 돌면서 UIKit의 API를 이용(1편 참조)하여 제약 사항을 지정하는 것이다.

 

    internal static var none: ConstraintAttributes { return 0 }

    internal static var left: ConstraintAttributes { return 1 }

    internal static var top: ConstraintAttributes {  return 2 }

    internal static var right: ConstraintAttributes { return 4 }

    internal static var bottom: ConstraintAttributes { return 8 }

 

10진수로 더해도 되지만, 본디 2진수의 각 자릿수가 더 편하다.

1, 2, 4, 8 이 각각 2진수에서 1, 10, 100, 1000이다. 그래서 2진수로 1111인 15의 값은

    internal static var edges: ConstraintAttributes { return 15 }

에 대입되어 있다.

 

size는 width, height다. 

 internal static var size: ConstraintAttributes { return 192 }

 

   internal static var width: ConstraintAttributes { return 64 }

   internal static var height: ConstraintAttributes { return 128 }

 

최고수는 

  internal static var centerWithinMargins: ConstraintAttributes { return 786432 }

라서 UInt(32비트에서만 2,147,483,647 64비트에서는 

18,446,744,073,709,551,615

... 믓튼 충분)에 담겨있다. 모든 수를 보려면(internal struct ConstraintAttributes : OptionSet... 참조)

 

이런 속성들을 

 

internal static func makeConstraints...

internal static func remakeConstraints...

internal static func updateConstraints...

internal static func removeConstraints(item: LayoutConstraintItem) {

        let constraints = item.constraints

        for constraint in constraints {

            constraint.deactivateIfNeeded()

        }

    }

 

를 이용하여 적용한다.

 

 internal func activateIfNeeded(updatingExisting: Bool = false) {

        guard let item = self.from.layoutConstraintItem else {

            print("WARNING: SnapKit failed to get from item from constraint. Activate will be a no-op.")

            return

        }

        let layoutConstraints = self.layoutConstraints

 

        if updatingExisting {

            var existingLayoutConstraints: [LayoutConstraint] = []

            for constraint in item.constraints {

                existingLayoutConstraints += constraint.layoutConstraints

            }

 

            for layoutConstraint in layoutConstraints {

                let existingLayoutConstraint = existingLayoutConstraints.first { $0 == layoutConstraint }

                guard let updateLayoutConstraint = existingLayoutConstraint else {

                    fatalError("Updated constraint could not find existing matching constraint to update: \(layoutConstraint)")

                }

 

                let updateLayoutAttribute = (updateLayoutConstraint.secondAttribute == .notAnAttribute) ? updateLayoutConstraint.firstAttribute : updateLayoutConstraint.secondAttribute

                updateLayoutConstraint.constant = self.constant.constraintConstantTargetValueFor(layoutAttribute: updateLayoutAttribute)

            }

        } else {

            

NSLayoutConstraint.activate(layoutConstraints)

            item.add(constraints: [self])

        }

    }

 

UI기초 전편의 링크를 보면 constratins를 적용하는 것이 번거로웠다.

 

contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|-[image(10)]", options: [], metrics: nil, views: viewsDict))

contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:[labTime]-|", options: [], metrics: nil, views: viewsDict))

contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "V:|-[username]-[message]-|", options: [], metrics: nil, views: viewsDict))

contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|-[username]-[image(10)]-|", options: [], metrics: nil, views: viewsDict))

contentView.addConstraints(NSLayoutConstraint.constraints(withVisualFormat: "H:|-[message]-[labTime]-|", options: [], metrics: nil, views: viewsDict))

 

혹은, 

 

        NSLayoutConstraint.deactivate([self])

        let newConstraint = NSLayoutConstraint(

            item: firstItem,

            attribute: firstAttribute,

            relatedBy: relation,

            toItem: secondItem,

            attribute: secondAttribute,

            multiplier: multiplier,

            constant: constant)

.

.

.

이런 식의...

 

그래서 쉬운 문법으로 AutoLayout을 위한 constraints를 쓸 수 있다는 점이 참 매력적인 SnapKit이다. , .snp.makeConstraints { (make) in ...    { $0. ...

 

'Swift & Python 실무 > {APP} SOCANNER APP' 카테고리의 다른 글

스토리보드 이동 방법  (0) 2019.02.14
제주도 항공 촬영  (0) 2019.01.19
C의 struct와 Swift 의 struct  (0) 2019.01.19
userDefault 활용  (0) 2019.01.16
Practical Swift  (0) 2019.01.14

+ Recent posts