Merhaba,
Tek tıkla Model-View-ViewModel dosyalarınızı oluşturabilirsiniz.
İndirdiğiniz klasördeki swift dosyalarının içeriklerini istediğiniz gibi değiştirebilirsiniz.
Klasörü /Users/scissors/Library/Developer/Xcode/Templates klasörüne atarsanız Xcode güncellemeleri yüzünden template kaybolmayacaktır.
Eklemek istediğiniz klasöre sağ tıklayıp "New File" diyerek template sayfasını açın.
![Ekran Resmi 2023-08-10 00 47 30](https://private-user-images.githubusercontent.com/44496296/259560234-7b23b72b-8ce6-4f26-a0a5-8a718f700ce3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjAyMzQtN2IyM2I3MmItOGNlNi00ZjI2LWEwYTUtOGE3MThmNzAwY2UzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTJiNjBmYjU4ZTMxNzM3YTkzN2E2ODM2ZjE5ZDM5MGUxYmVhNjgxY2U4NDk0ZjBiYjA2MjZiMTExMTBiNGVjMzImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.lSVajCo4vaCbIZT-46Rixn_wfmW4Iln8pt7-7lUW9ZY)
En aşağı inerek "MVVM Module" seçin.
![Ekran Resmi 2023-08-10 00 49 25](https://private-user-images.githubusercontent.com/44496296/259560592-efc71c1c-2836-4d60-9282-fbd73a10858b.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA1OTItZWZjNzFjMWMtMjgzNi00ZDYwLTkyODItZmJkNzNhMTA4NThiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTIyOGVjNTE5MDg1ZTgyZDZiZGViZTllM2YzOTRiZmY1Y2FhYWIxZDg4NTEyZWMyN2JlMzgzM2ZiYTllZTQ4NzMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.SIbjXkAMktfT-HBqn10IZwZcJr9fpp3-gI6GpCYNPlM)
Module ismine oluşturmak istediğiniz ViewController'ın ismini yazın. Ör: "HomeViewController" oluşturmak istiyorsanız sadece "Home" yazın. Model,ViewController,ViewModel gibi uzantılar otomatik eklenecektir.
![Ekran Resmi 2023-08-10 00 49 41](https://private-user-images.githubusercontent.com/44496296/259560633-5327f3e3-9b16-4a35-a95f-b97ab64904e1.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA2MzMtNTMyN2YzZTMtOWIxNi00YTM1LWE5NWYtYjk3YWI2NDkwNGUxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg1ODdhMTRlZDUyNTZkYzU1MzViYTM5YzY4OWI3YWQ1YmUxMjIxODQ3Y2FkMjY2YmQ0MWIxMTA3YjliYjZiN2MmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.ofcbVe3uiTyq1acpH2x_7x-VffgEvGpVQFY4oNgZQqM)
View alanından "None, Storyboard , XIB" seçebilirsiniz.
![Ekran Resmi 2023-08-10 00 49 46](https://private-user-images.githubusercontent.com/44496296/259560660-dcbb3e3e-5eab-4009-b22a-d871bf66370c.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA2NjAtZGNiYjNlM2UtNWVhYi00MDA5LWIyMmEtZDg3MWJmNjYzNzBjLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg0OThiYWMxMmVkY2JlNGRhOTM4YzJlYWM2YjAzMzI4MGY1MTFhNGU1OWQxMjA2MDhlZjE4N2RjYmUwMGNhOTgmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.jcq6kvG7EBLk5Y1bVmRoLf__X2YmoMCYpysyhrYguKM)
Dosyalar eklendi fakat küçük bir sorun var. Tüm dosyalar reference olarak eklendi. Bu yüzden dosyaları projeye dahil etmelisiniz. Bunun için yine bulunduğunuz klasörde sağ tıklayarak "Add files to 'proje_isminiz'..." seçeneğini seçmelisiniz.
![Ekran Resmi 2023-08-10 00 50 58](https://private-user-images.githubusercontent.com/44496296/259560781-313374ed-fa70-431c-8ccf-969a81de606f.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA3ODEtMzEzMzc0ZWQtZmE3MC00MzFjLThjY2YtOTY5YTgxZGU2MDZmLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTI1YTFkZjM4MGJlZTA3ZGQ4MGU1M2UyMWQzZjNlYjBkMTY1NWNhNmYzOTgxYWVmZTU0MTlhOGQ4YmFhM2QxNzAmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Tt_Hne3vTfhjOhTipS36gFaUrm6BFdpMz74NYyrCkt4)
Açılan ekranda biraz önce oluşturduğunuz klasörü seçip ekle demelisiniz. Burada "Copy items if needed" ve "Create groups" seçeneklerinin seçili olduğundan emin olmalısınız.
![Ekran Resmi 2023-08-10 00 51 13](https://private-user-images.githubusercontent.com/44496296/259560862-e91df0a4-f5dc-4bf5-8255-d555e374f637.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA4NjItZTkxZGYwYTQtZjVkYy00YmY1LTgyNTUtZDU1NWUzNzRmNjM3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTQ4ODJmYTk3MzI0MjA4MzYwYTY5ZWEyZDc0NTU0NzEzMDU3MzQ0YzkzNzQ5NjJlNWVjODZmM2JkYzFmMzdhNzEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.o6GF59aMHL40vXxfl77l2Gff_omG43uKuybnhfkNG8A)
Artık dosyalarınız projeye dahil oldu.
![Ekran Resmi 2023-08-10 00 51 33](https://private-user-images.githubusercontent.com/44496296/259560878-388af876-6832-4a8e-a92e-a33eacd50945.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA4NzgtMzg4YWY4NzYtNjgzMi00YThlLWE5MmUtYTMzZWFjZDUwOTQ1LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWUzYTU0NjcxNGE4MGQ1NDcwMTFjYmI0OGEzYjg4ZjAwZjhkNDc2NGIwY2MyYzVlNjY1ZjU1OGY0YzU4NzQ3NDMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.JSlaO_ef_MojmmYinzMJK5xVGpFmYJn_yqWWLxcSMXw)
Reference yapıda olan ilk oluşturduğunuz mavi renkli klasöre sağ tıklayıp delete demelisiniz.
![Ekran Resmi 2023-08-10 00 51 43](https://private-user-images.githubusercontent.com/44496296/259560907-e2ae5217-d1f3-446c-89c0-9c3d65aea9d3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA5MDctZTJhZTUyMTctZDFmMy00NDZjLTg5YzAtOWMzZDY1YWVhOWQzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTcyMDE3NmU3YjM3MmVlZDk5OWZhNWQyNjU2NjQ5YzQ0NThjZDM3OTMwM2U1MmYyNTMyNThiMzFlYThlYjU0NWQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Faz-Etu-yEpz0UEY_NlcdYOli9bRvopkSb_tuAgpPwY)
Açılan ekranda "Remove Reference" seçmelisiniz. Aksi takdirde reference kaldırmadığınız ve dosyaları sildiğiniz için biraz önce projeye dahil ettiğiniz dosyalar ulaşılamaz olacaktır.
![Ekran Resmi 2023-08-10 00 52 01](https://private-user-images.githubusercontent.com/44496296/259560929-b2594608-1b8d-4e54-9fb6-7b1b5e066072.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA5MjktYjI1OTQ2MDgtMWI4ZC00ZTU0LTlmYjYtN2IxYjVlMDY2MDcyLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTAzYjFkMGFmMjZjZTEyYjEwMTg5Yjg3MjU4Nzk5OTI1YWM0MDY2ZjAyZTgxNjRlNmVkNzhiOGM1ZTQ5ZmZkOGEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.0Dn8AQVdWljUe3c1uaTRsZrTIwOV6BPrMDbH4ishHpY)
Oluşan dosyalar aşağıdaki gibidir. Dosyaların içeriğini template klasörünün içinde istediğiniz gibi düzenleyebilirsiniz.
ViewController
![Ekran Resmi 2023-08-10 00 53 05](https://private-user-images.githubusercontent.com/44496296/259560954-d0d84429-f867-411f-92a7-64c6cd68cdbe.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA5NTQtZDBkODQ0MjktZjg2Ny00MTFmLTkyYTctNjRjNmNkNjhjZGJlLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTg5MDUwYjg1MTg5MWM2YzRkZWIyZjQwYmU3ODU0NDMxN2I3YTg0MmE3YjNlMTE1NmE2NWVkMjA3ZTc5NGUxYmMmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.sKlR5s6lXvje6VuGsf8wqOrSJNkdAKxN1SCP8OGfz5o)
Model
![Ekran Resmi 2023-08-10 00 53 15](https://private-user-images.githubusercontent.com/44496296/259560992-94befcd7-cec6-4aaf-bd1c-0d609b017141.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjA5OTItOTRiZWZjZDctY2VjNi00YWFmLWJkMWMtMGQ2MDliMDE3MTQxLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTczOTk2MmQyOTQ3NDExODYzZTE5MGYxOGI5ZTI3NzZjYzNkNThlYmJiOWM4ZTU5YzYxMzFmMjc2ZGViYWY2NjEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.pAsoMTAozBZLvO5UWRJ3fIevCUC6_WwqcEwgttxnyQk)
ViewModel
![Ekran Resmi 2023-08-10 00 53 22](https://private-user-images.githubusercontent.com/44496296/259561008-fddcc231-ec55-420a-85f0-ae9da3659400.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjM3NDI0MDMsIm5iZiI6MTcyMzc0MjEwMywicGF0aCI6Ii80NDQ5NjI5Ni8yNTk1NjEwMDgtZmRkY2MyMzEtZWM1NS00MjBhLTg1ZjAtYWU5ZGEzNjU5NDAwLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MTUlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODE1VDE3MTUwM1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTU4YzQzNDVhM2E4MGQ5ZjdiMzE4M2VlN2E0MTRhM2Y2NzY1NDkzZTI1NzZkYzRhYWMyNWFmZWZjMjQ3ZjY3MmEmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.Z24xapcClYiZn-ttq9n9ChDXIkLV1YTOHinF7RI3Flc)