I'm very new to Objective-C. I've developed several dozens of desktop applications with VB.NET and several dozens more with REAL Stupid for Macs. I've read several hard-cover books and PDF books over Objective-C functions. They only talk about how to create a function with integers. I want to go beyond integers. For example, the following simple VB.NET function involves a string, returning true or false (boolean). It's quite simple and straightforward.
Function SayBoolean (ByVal w As String) As Boolean
If w = "hello" Then
Return True
Else
Return False
End if
End Function
The following function returns a string (the file extension) with a string (a file path).
Function xGetExt(ByVal f As String) As String
'Getting the file extension
Dim fName1 As String = Path.GetFileName(f)
Dim fName2 As String = Path.GetFileNameWithoutExtension(f)
Dim s As String = Replace(Replace(fName1, fName2, ""), ".", "")
Return s
End Function
So how do you specify string parameters and return a boolean or a string in creating a function with Objective-C? Objective-C is terribly difficult for me so far.
Thank you for your help.
Tom