Tagged: #swiftprogramming

Xcode для начинающих (Swift)

для новичков, чайников, начинающих, учеников, junior, beginner, start

С чего начать новичку Каждый разработчик должен понимать английский хотя бы на базовом уровне, чтобы уметь читать техническую документацию. Ведь самые полезные книги пишутся именно на английском языке. Если ты новичок в языке Swift и в такой среде разработки как Xcode, то тебе обязательно нужно ознакомиться с книгой Matthijs Hollemans – iOS Apprentice Getting Started Эта книга поможет тебе разобраться в интерфейсе программы, узнать какая вкладка за что отвечает и написать свой первый код на Swift. Книга находится в приложении: iOS_Apprentice_1_Getting_Started_v5.0

Read & comments

Gif animation (Swift)

Embed Gif animation? Easy! 😏 There are 3 easiest ways to embed an animation into a Gif application:  Download using UIImageView: 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘎𝘪𝘧 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦.𝘨𝘪𝘧𝘐𝘮𝘢𝘨𝘦𝘞𝘪𝘵𝘩𝘕𝘢𝘮𝘦 (“𝘯𝘢𝘮𝘦”) 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸 (𝘪𝘮𝘢𝘨𝘦: 𝘪𝘮𝘢𝘨𝘦𝘎𝘪𝘧)  Download using Data: 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘋𝘢𝘵𝘢 = 𝘵𝘳𝘺? 𝘋𝘢𝘵𝘢 (𝘤𝘰𝘯𝘵𝘦𝘯𝘵𝘴𝘖𝘧: 𝘉𝘶𝘯𝘥𝘭𝘦.𝘮𝘢𝘪𝘯.𝘶𝘳𝘭 (𝘧𝘰𝘳𝘙𝘦𝘴𝘰𝘶𝘳𝘤𝘦: “𝘯𝘢𝘮𝘦𝘎𝘪𝘧”, 𝘸𝘪𝘵𝘩𝘌𝘹𝘵𝘦𝘯𝘴𝘪𝘰𝘯: “𝘨𝘪𝘧”)!) 𝘭𝘦𝘵 𝘪𝘮𝘨𝘛𝘪𝘮𝘦𝘎𝘪𝘧 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦.𝘨𝘪𝘧𝘐𝘮𝘢𝘨𝘦𝘞𝘪𝘵𝘩𝘋𝘢𝘵𝘢 (𝘪𝘮𝘢𝘨𝘦𝘋𝘢𝘵𝘢!) 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸 (𝘪𝘮𝘢𝘨𝘦: 𝘪𝘮𝘨𝘛𝘪𝘮𝘦𝘎𝘪𝘧)  Download via URL: 𝘭𝘦𝘵 𝘨𝘪𝘧𝘜𝘙𝘓 : 𝘚𝘵𝘳𝘪𝘯𝘨 = “𝘩𝘵𝘵𝘱://𝘸𝘸𝘸.𝘯𝘢𝘮𝘦.𝘤𝘰𝘮/𝘯𝘢𝘮𝘦𝘎𝘪𝘧.𝘨𝘪𝘧” 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘜𝘙𝘓 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦.𝘨𝘪𝘧𝘐𝘮𝘢𝘨𝘦𝘞𝘪𝘵𝘩𝘜𝘙𝘓(𝘨𝘪𝘧𝘜𝘙𝘓) 𝘭𝘦𝘵 𝘪𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸 = 𝘜𝘐𝘐𝘮𝘢𝘨𝘦𝘝𝘪𝘦𝘸(𝘪𝘮𝘢𝘨𝘦: 𝘪𝘮𝘢𝘨𝘦𝘜𝘙𝘓) Cats Gif RabbiFox 2-3 easy steps and animation is built in! Supplement to the code in the document: iOSGIF.swift Swift...

Read & comments

Localize the storyboard and xib (Swift)

  • 1
  • 2
  • 3

We learn to localize the storyboard or xib. First, create your application, then go to Project – Info – Localizations, click on + and add the languages ​​you need (Pic 1), when adding, you can check which objects you want to apply localization to. Next, next to your storyboard or xib, you will see a down arrow, expand the list, and you will see that the strings file (the specified language) has been added and it lists all the text that is in the storyboard (Pic 2). You can select all languages ​​in the Inspector...

Read & comments

UIPanGestureRecognizer (Swift)

UIPanGestureRecognizer – with it you can move the overview of the area. For example: you can use UIPinchGestureRecognizer to magnify the picture and now you need the ability to move the viewport to view it completely. ✅ – Create a UIImageView; ✅ – Create UIPanGestureRecognizer () ✅ – Assign PanGesture function for panning (panGesture = UIPinchGestureRecognizer (target: self, action: # selector (self.handlePan))); ✅ – We write the necessary actions in the function (@objc func handlePan (recognizer: UIPanGestureRecognizer) { let translate = recognizer.translationInView (self.view) if let view = recognizer.view { view. center = CGPoint (x: view....

Read & comments

UIPinchGestureRecognizer (Swift)

UIPinchGestureRecognizer – tap the screen with two fingers and spread them in different directions, so you can increase the scope of the object, slide the finger together again and so you reduce the area. For example: we need to increase the scope of the picture to see it closer. We create the UIImageView, which we assign to our picture: ➕ imageView.image = UIImage (named: “cat”) Create a UIPinchGestureRecognizer, which assigns the function myPinchTap: ➕ pinchGesture = UIPinchGestureRecognizer (target: self, action: # selector (self.myPinchTap)) In the function myPinchTap, we assign the change in the size of...

Read & comments