summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2023-05-13 17:21:51 +0300
committerGravatar Vitaly Takmazov2023-05-14 01:15:35 +0300
commit773754148b7006140963dcebfab21766b6f1c6fb (patch)
tree5c1d17fe6bfc723dd02aec7e47626b00b8dcca7f
parent8d6a2bd09634e6885a213cfb75a44e2c5f6feafd (diff)
Starting to convert UIKit classes
-rw-r--r--Juick.xcodeproj/project.pbxproj13
-rw-r--r--Juick/Supporting Files/Juick-Bridging-Header.h1
-rw-r--r--Juick/Views/ContentLoadingCell.h17
-rw-r--r--Juick/Views/ContentLoadingCell.m23
-rw-r--r--Juick/Views/ContentLoadingCell.swift17
-rw-r--r--Juick/Views/ContentLoadingCell.xib8
6 files changed, 29 insertions, 50 deletions
diff --git a/Juick.xcodeproj/project.pbxproj b/Juick.xcodeproj/project.pbxproj
index bd7e526..e6d4931 100644
--- a/Juick.xcodeproj/project.pbxproj
+++ b/Juick.xcodeproj/project.pbxproj
@@ -37,12 +37,12 @@
774746AD239F82A10001C7F9 /* NSDate+TimeAgo.m in Sources */ = {isa = PBXBuildFile; fileRef = 774746AC239F82A10001C7F9 /* NSDate+TimeAgo.m */; };
774746B6239F872A0001C7F9 /* CoreServices.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 774746B5239F872A0001C7F9 /* CoreServices.framework */; };
774C98CD25126C070073C70A /* Service.swift in Sources */ = {isa = PBXBuildFile; fileRef = 774C98CC25126C070073C70A /* Service.swift */; };
- 7761133821766A3000D350CD /* ContentLoadingCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 7761133621766A3000D350CD /* ContentLoadingCell.m */; };
7761133921766A3000D350CD /* ContentLoadingCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7761133721766A3000D350CD /* ContentLoadingCell.xib */; };
7761135D21790B0300D350CD /* JuickPush.appex in Embed Foundation Extensions */ = {isa = PBXBuildFile; fileRef = 7761135521790B0200D350CD /* JuickPush.appex */; settings = {ATTRIBUTES = (RemoveHeadersOnCopy, ); }; };
776C41BD1FD3EF180063B82E /* MessageCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 776C41BB1FD3EF180063B82E /* MessageCell.m */; };
776C41BE1FD3EF180063B82E /* MessageCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 776C41BC1FD3EF180063B82E /* MessageCell.xib */; };
776C41C11FD3FF6E0063B82E /* FeedViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 776C41C01FD3FF6E0063B82E /* FeedViewController.m */; };
+ 776D4EE32A0FD1A300C8BD91 /* ContentLoadingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */; };
778560602343D24E00BB37A2 /* NSData+Hex.m in Sources */ = {isa = PBXBuildFile; fileRef = 7785605F2343D24E00BB37A2 /* NSData+Hex.m */; };
778560632344CF6F00BB37A2 /* JuickNavigationController.m in Sources */ = {isa = PBXBuildFile; fileRef = 778560622344CF6F00BB37A2 /* JuickNavigationController.m */; };
77975A1D182B6E9A00410C2B /* NewPostViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 77975A1C182B6E9A00410C2B /* NewPostViewController.m */; };
@@ -151,8 +151,6 @@
774746B5239F872A0001C7F9 /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.15.sdk/System/Library/Frameworks/CoreServices.framework; sourceTree = DEVELOPER_DIR; };
774C98C0251263720073C70A /* Juick-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Juick-Bridging-Header.h"; sourceTree = "<group>"; };
774C98CC25126C070073C70A /* Service.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Service.swift; sourceTree = "<group>"; };
- 7761133521766A3000D350CD /* ContentLoadingCell.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = ContentLoadingCell.h; sourceTree = "<group>"; };
- 7761133621766A3000D350CD /* ContentLoadingCell.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = ContentLoadingCell.m; sourceTree = "<group>"; };
7761133721766A3000D350CD /* ContentLoadingCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ContentLoadingCell.xib; sourceTree = "<group>"; };
7761135521790B0200D350CD /* JuickPush.appex */ = {isa = PBXFileReference; explicitFileType = "wrapper.app-extension"; includeInIndex = 0; path = JuickPush.appex; sourceTree = BUILT_PRODUCTS_DIR; };
7761135A21790B0300D350CD /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
@@ -162,6 +160,7 @@
776C41BC1FD3EF180063B82E /* MessageCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MessageCell.xib; sourceTree = "<group>"; };
776C41BF1FD3FF6E0063B82E /* FeedViewController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = FeedViewController.h; sourceTree = "<group>"; };
776C41C01FD3FF6E0063B82E /* FeedViewController.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = FeedViewController.m; sourceTree = "<group>"; };
+ 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ContentLoadingCell.swift; sourceTree = "<group>"; };
7785605E2343D24E00BB37A2 /* NSData+Hex.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "NSData+Hex.h"; sourceTree = "<group>"; };
7785605F2343D24E00BB37A2 /* NSData+Hex.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = "NSData+Hex.m"; sourceTree = "<group>"; };
778560612344CF6F00BB37A2 /* JuickNavigationController.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = JuickNavigationController.h; sourceTree = "<group>"; };
@@ -429,9 +428,8 @@
77B8B39A207A5629005CB20C /* MessageInputView.h */,
77B8B39B207A5629005CB20C /* MessageInputView.m */,
77B8B398207A52BD005CB20C /* MessageInputView.xib */,
- 7761133521766A3000D350CD /* ContentLoadingCell.h */,
- 7761133621766A3000D350CD /* ContentLoadingCell.m */,
7761133721766A3000D350CD /* ContentLoadingCell.xib */,
+ 776D4EE22A0FD1A300C8BD91 /* ContentLoadingCell.swift */,
);
path = Views;
sourceTree = "<group>";
@@ -598,7 +596,7 @@
files = (
77C36498224417FC0017522C /* DiscussionsController.m in Sources */,
770C86E325117D78009B6404 /* UIView+Shimmer.m in Sources */,
- 7761133821766A3000D350CD /* ContentLoadingCell.m in Sources */,
+ 776D4EE32A0FD1A300C8BD91 /* ContentLoadingCell.swift in Sources */,
77E61A5E1FD4682B00B4E304 /* QuoteView.m in Sources */,
77317BBC181BBE8500D60005 /* AppDelegate.m in Sources */,
776C41C11FD3FF6E0063B82E /* FeedViewController.m in Sources */,
@@ -803,6 +801,7 @@
PROVISIONING_PROFILE = "";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+ SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2,6";
WRAPPER_EXTENSION = app;
};
@@ -825,6 +824,7 @@
PROVISIONING_PROFILE = "";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+ SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2,6";
WRAPPER_EXTENSION = app;
};
@@ -972,6 +972,7 @@
PROVISIONING_PROFILE = "";
SUPPORTS_MACCATALYST = YES;
SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO;
+ SWIFT_OBJC_BRIDGING_HEADER = "Juick/Supporting Files/Juick-Bridging-Header.h";
TARGETED_DEVICE_FAMILY = "1,2,6";
WRAPPER_EXTENSION = app;
};
diff --git a/Juick/Supporting Files/Juick-Bridging-Header.h b/Juick/Supporting Files/Juick-Bridging-Header.h
index e11d920..5dfa23b 100644
--- a/Juick/Supporting Files/Juick-Bridging-Header.h
+++ b/Juick/Supporting Files/Juick-Bridging-Header.h
@@ -1,3 +1,4 @@
//
// Use this file to import your target's public headers that you would like to expose to Swift.
//
+#import "UIView+Shimmer.h"
diff --git a/Juick/Views/ContentLoadingCell.h b/Juick/Views/ContentLoadingCell.h
deleted file mode 100644
index d9a8f6f..0000000
--- a/Juick/Views/ContentLoadingCell.h
+++ /dev/null
@@ -1,17 +0,0 @@
-//
-// ContentLoadingCell.h
-// Juick
-//
-// Created by Vitaly Takmazov on 16/10/2018.
-// Copyright © 2018 com.juick. All rights reserved.
-//
-
-#import <UIKit/UIKit.h>
-
-NS_ASSUME_NONNULL_BEGIN
-
-@interface ContentLoadingCell : UITableViewCell
-
-@end
-
-NS_ASSUME_NONNULL_END
diff --git a/Juick/Views/ContentLoadingCell.m b/Juick/Views/ContentLoadingCell.m
deleted file mode 100644
index 90329fa..0000000
--- a/Juick/Views/ContentLoadingCell.m
+++ /dev/null
@@ -1,23 +0,0 @@
-//
-// ContentLoadingCell.m
-// Juick
-//
-// Created by Vitaly Takmazov on 16/10/2018.
-// Copyright © 2018 com.juick. All rights reserved.
-//
-
-#import "ContentLoadingCell.h"
-
-@implementation ContentLoadingCell
-
-- (void)awakeFromNib {
- [super awakeFromNib];
- self.userInteractionEnabled = NO;
-}
-
-- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
- [super setSelected:selected animated:animated];
- [self.contentView startShimmering];
-}
-
-@end
diff --git a/Juick/Views/ContentLoadingCell.swift b/Juick/Views/ContentLoadingCell.swift
new file mode 100644
index 0000000..a7f0cf0
--- /dev/null
+++ b/Juick/Views/ContentLoadingCell.swift
@@ -0,0 +1,17 @@
+//
+// ContentLoadingCell.swift
+// Juick
+//
+// Created by Vitaly Takmazov on 13.05.2023.
+// Copyright © 2023 com.juick. All rights reserved.
+//
+
+import UIKit
+
+@objc
+class ContentLoadingCell: UITableViewCell {
+ override func setSelected(_ selected: Bool, animated: Bool) {
+ super.setSelected(selected, animated: animated)
+ self.contentView.startShimmering()
+ }
+}
diff --git a/Juick/Views/ContentLoadingCell.xib b/Juick/Views/ContentLoadingCell.xib
index 9a8b659..36b2c50 100644
--- a/Juick/Views/ContentLoadingCell.xib
+++ b/Juick/Views/ContentLoadingCell.xib
@@ -1,19 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="19455" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
<device id="retina4_7" orientation="portrait" appearance="light"/>
<dependencies>
<deployment identifier="iOS"/>
- <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="19454"/>
+ <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21678"/>
<capability name="Named colors" minToolsVersion="9.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
- <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="contentLoadingCell" rowHeight="230" id="KGk-i7-Jjw" customClass="ContentLoadingCell">
+ <tableViewCell contentMode="scaleToFill" selectionStyle="default" indentationWidth="10" reuseIdentifier="contentLoadingCell" rowHeight="230" id="KGk-i7-Jjw" customClass="ContentLoadingCell" customModule="Juick" customModuleProvider="target">
<rect key="frame" x="0.0" y="0.0" width="310" height="230"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
- <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+ <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" userInteractionEnabled="NO" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
<rect key="frame" x="0.0" y="0.0" width="310" height="230"/>
<autoresizingMask key="autoresizingMask"/>
<subviews>