instance-variables


Passing a return `NSString` variable from a class ( `+(id)` ) to another view controller class


Passing a return NSString variable from a class ( +(id) ) to another view controller class, as a result, it returned NIL by using NSLog.
Is there any concepts I missed?
sharedFile.h
......
#property (nonmatic, retain) NSString *returnDB;
+(id)chkDB:(NSString *)returnDB;
......
sharedFile.m
+(id)chkDB:(NSString *)returnDB{
........something......
return returnDB;
}
viewController1.m
import "sharedFile.h"
......
NSString *returnDB = [[NSString alloc] init];
[sharedFile chkDb:returnDB];
NSLog(#"result: %#", returnDB];
Handle your method result:
NSString *returnDB = [[NSString alloc] init];
returnDB = [sharedFile chkDb:returnDB];
NSLog(#"result: %#", returnDB);

Related Links

Passing a return `NSString` variable from a class ( `+(id)` ) to another view controller class
On benefits of using ivar variables instead of getters
Instance variable in Stripes

Categories

HOME
extjs
autocomplete
jersey-2.0
portable-class-library
qooxdoo
openflow
iptables
ontology
phpseclib
scheduler
anchor
selection
xamarin-zebble
amazon-emr
erd
jquery-select2-4
stimulsoft
jodatime
webstore
squid
pywinauto
node-webkit
bsd
backendless
vuforia
cellular-network
morris.js
multi-dimensional-scaling
beego
ruby-daemons
gravity-forms-plugin
math.js
bitbake
envoy
opnet
actframework
android-alarms
unification
selenide
microkernel
newtons-method
expandablelistview
julius-speech
morphline
.net-micro-framework
hibernate-ogm
sharpdx
android-webservice
patternlab.io
alertify
nrf51
finder
oracle-fusion-apps
mifos
thread-exceptions
okio
logical
mathjs
fuzzer
msbuild-4.0
dojo-build
eclemma
django-redis
gwt-syncproxy
ioexception
lowercase
http.client
ambiguity
sqlbase
org-babel
nssortdescriptor
pass-by-value
directorysearcher
comctl32
rubber
xml-signature
object-code
aho-corasick
code-complexity
thruway
assetic
principalcontext
unrealscript
tnt4j
web-frameworks
oscilloscope
django-filebrowser
cgrectmake
struts2-json-plugin
stretch
live-wallpaper
viewpagerindicator
asio
airprint
sscli
fxruby
gui-designer

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App