4 Commits

Author SHA1 Message Date
Roman Podymov ceca40bb06 Nullability (#1091) 2023-06-29 10:17:03 -03:00
Martin Barreto 8335af6d83 Update README.md 2023-03-17 18:07:43 -03:00
Martin Barreto 6cf22d3cf2 Add files via upload 2023-03-17 18:05:55 -03:00
Enrique Galindo cd5d983b1a Create FUNDING.yml 2022-09-01 13:10:11 -03:00
17 changed files with 40 additions and 32 deletions
+13
View File
@@ -0,0 +1,13 @@
# These are supported funding model platforms
github: xmartlabs # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
+3 -3
View File
@@ -43,7 +43,7 @@ PODS:
- XLData/RemoteDataStore (2.0.0):
- XLData/CoreRemote
- XLData/DataStore
- XLForm (4.2.0)
- XLForm (4.3.0)
DEPENDENCIES:
- AFNetworking (~> 2.0)
@@ -78,8 +78,8 @@ SPEC CHECKSUMS:
JVFloatLabeledTextField: 58a3a32cfb800e5b224f676987e7c13abf50a14d
SHSPhoneComponent: 4cec0653a150ad63cbc52b0c8b29ce2d3c9c26f0
XLData: df725c6179e2e0c80bf56a1ecad9afd169707a6d
XLForm: eb04ea4104f26250b70a72a7fa2eed3748dca5cd
XLForm: a439f9512078ed538e8335c8b06d3f3286bbfd37
PODFILE CHECKSUM: 64fbcd03a2c13762b2c18e3938cc8008807937c9
COCOAPODS: 1.9.3
COCOAPODS: 1.11.3
@@ -88,7 +88,7 @@ class InlineSegmentedControl : XLFormBaseCell, XLFormInlineRowDescriptorCell {
var inlineRowDescriptor : XLFormRowDescriptor?
lazy var segmentedControl : UISegmentedControl = {
return UISegmentedControl.autolayout()!
return UISegmentedControl.autolayout()
}()
override func configure() {
+1 -4
View File
@@ -1,7 +1,4 @@
XLForm
---------------
By [XMARTLABS](http://xmartlabs.com).
![XLForm](https://raw.githubusercontent.com/xmartlabs/XLForm/master/XLForm.png)
[![Build Status](https://travis-ci.org/xmartlabs/XLForm.svg?branch=master)](https://travis-ci.org/xmartlabs/XLForm)
<a href="https://cocoapods.org/pods/XLForm"><img src="https://img.shields.io/cocoapods/v/XLForm.svg" alt="CocoaPods compatible" /></a>
BIN
View File
Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

+1 -1
View File
@@ -27,6 +27,6 @@
@interface NSArray (XLFormAdditions)
-(NSInteger)formIndexForItem:(id)item;
-(NSInteger)formIndexForItem:(nonnull id)item;
@end
+1 -1
View File
@@ -28,7 +28,7 @@
@implementation NSArray (XLFormAdditions)
-(NSInteger)formIndexForItem:(id)item
-(NSInteger)formIndexForItem:(nonnull id)item
{
for (id selectedValueItem in self) {
if ([[selectedValueItem valueData] isEqual:[item valueData]]){
+1 -1
View File
@@ -28,6 +28,6 @@
@interface NSExpression (XLFormAdditions)
-(NSMutableArray*) getExpressionVars;
-(nullable NSMutableArray*) getExpressionVars;
@end
+1 -3
View File
@@ -29,7 +29,7 @@
@implementation NSExpression (XLFormAdditions)
-(NSMutableArray*) getExpressionVars{
-(nullable NSMutableArray*) getExpressionVars{
switch (self.expressionType) {
case NSFunctionExpressionType:{
NSString* str = [NSString stringWithFormat:@"%@", self];
@@ -38,11 +38,9 @@
else
str = [str substringFromIndex:1];
return [[NSMutableArray alloc] initWithObjects: str, nil];
break;
}
default:
return nil;
break;
}
}
+2 -2
View File
@@ -27,7 +27,7 @@
@interface NSObject (XLFormAdditions)
-(NSString *)displayText;
-(id)valueData;
-(nullable NSString *)displayText;
-(nullable id)valueData;
@end
+2 -2
View File
@@ -29,7 +29,7 @@
@implementation NSObject (XLFormAdditions)
-(NSString *)displayText
-(nullable NSString *)displayText
{
if ([self conformsToProtocol:@protocol(XLFormOptionObject)]){
return [(id<XLFormOptionObject>)self formDisplayText];
@@ -40,7 +40,7 @@
return nil;
}
-(id)valueData
-(nullable id)valueData
{
if ([self isKindOfClass:[NSString class]] || [self isKindOfClass:[NSNumber class]] || [self isKindOfClass:[NSDate class]]){
return self;
+1 -1
View File
@@ -27,5 +27,5 @@
@interface NSPredicate (XLFormAdditions)
-(NSMutableArray*) getPredicateVars;
-(nonnull NSMutableArray*) getPredicateVars;
@end
+1 -1
View File
@@ -28,7 +28,7 @@
@implementation NSPredicate (XLFormAdditions)
-(NSMutableArray*) getPredicateVars{
-(nonnull NSMutableArray*) getPredicateVars{
NSMutableArray* ret = [[NSMutableArray alloc] init];
if ([self isKindOfClass:([NSCompoundPredicate class])]) {
for (id object in ((NSCompoundPredicate*) self).subpredicates ) {
+2 -2
View File
@@ -28,8 +28,8 @@
@interface NSString (XLFormAdditions)
-(NSPredicate *)formPredicate;
-(nonnull NSPredicate *)formPredicate;
-(NSString *)formKeyForPredicateType:(XLPredicateType)predicateType;
-(nonnull NSString *)formKeyForPredicateType:(XLPredicateType)predicateType;
@end
+2 -2
View File
@@ -27,7 +27,7 @@
@implementation NSString (XLFormAdditions)
-(NSPredicate *)formPredicate
-(nonnull NSPredicate *)formPredicate
{
// returns an array of strings where the first one is the new string with the correct replacements
// and the rest are all the tags that appear in the string
@@ -57,7 +57,7 @@
}
-(NSString *)formKeyForPredicateType:(XLPredicateType)predicateType
-(nonnull NSString *)formKeyForPredicateType:(XLPredicateType)predicateType
{
return [NSString stringWithFormat:@"%@-%@", self, (predicateType == XLPredicateTypeHidden ? @"hidden" : @"disabled") ];
}
+4 -4
View File
@@ -28,9 +28,9 @@
@interface UIView (XLFormAdditions)
+(instancetype)autolayoutView;
-(NSLayoutConstraint *)layoutConstraintSameHeightOf:(UIView *)view;
-(UIView *)findFirstResponder;
-(UITableViewCell<XLFormDescriptorCell> *)formDescriptorCell;
+(nonnull instancetype)autolayoutView;
-(nonnull NSLayoutConstraint *)layoutConstraintSameHeightOf:(nonnull UIView *)view;
-(nullable UIView *)findFirstResponder;
-(nullable UITableViewCell<XLFormDescriptorCell> *)formDescriptorCell;
@end
+4 -4
View File
@@ -27,7 +27,7 @@
@implementation UIView (XLFormAdditions)
+ (instancetype)autolayoutView
+ (nonnull instancetype)autolayoutView
{
__kindof UIView *view = [self new];
view.translatesAutoresizingMaskIntoConstraints = NO;
@@ -35,7 +35,7 @@
return view;
}
- (NSLayoutConstraint *)layoutConstraintSameHeightOf:(UIView *)view
- (nonnull NSLayoutConstraint *)layoutConstraintSameHeightOf:(nonnull UIView *)view
{
return [NSLayoutConstraint constraintWithItem:self
attribute:NSLayoutAttributeHeight
@@ -46,7 +46,7 @@
constant:0.0];
}
- (UIView *)findFirstResponder
- (nullable UIView *)findFirstResponder
{
UIView *firstResponder = nil;
if (self.isFirstResponder) {
@@ -66,7 +66,7 @@
return firstResponder;
}
- (UITableViewCell<XLFormDescriptorCell> *)formDescriptorCell
- (nullable UITableViewCell<XLFormDescriptorCell> *)formDescriptorCell
{
UITableViewCell<XLFormDescriptorCell> * tableViewCell = nil;