我正在为Swift + Objective-C项目添加一个新框架。
所以,在我的框架中,我有一个总括标题:xFramework.h
#import <UIKit/UIKit.h>
//! Project version number for xFramework.
FOUNDATION_EXPORT double xFrameworkVersionNumber;
//! Project version string for xFramework.
FOUNDATION_EXPORT const unsigned char xFrameworkVersionString[];
我不想在我的框架中依赖UIKit
。但是,如果我删除导入,则无法找到FOUNDATION_EXPORT
。
xFrameworkVersionNumber
和xFrameworkVersionString[]
?我从this question了解FOUNDATION_EXPORT
是一种pubic
。
谢谢。
答案 0 :(得分:3)
您可以替换
<System.Runtime.CompilerServices.Extension>
Public Function ToCsvString(row As DataRow, delimiter As String, dateFormat As String, formatProvider As IFormatProvider) As String
If dateFormat Is Nothing Then
dateFormat = DateTimeFormatInfo.InvariantInfo.ShortDatePattern
End If
If formatProvider Is Nothing Then
formatProvider = DateTimeFormatInfo.InvariantInfo
End If
Dim fields = row.Table.Columns.Cast(Of DataColumn)().
Select(Function(c) If(c.DataType <> GetType(DateTime), row(c).ToString(), row.Field(Of DateTime)(c).ToString(dateFormat, formatProvider)))
Return String.Join(delimiter, fields) ' with .NET 3.5 you need fields.ToArray()
End Function
通过
#import <UIKit/UIKit.h>