I have to show image in imageView using SDWebImage
Here is my code:
NSString *string2 = [[dataArray objectAtIndex:indexPath.row ]valueForKey:#"logo"];
[imagev sd_setImageWithURL:[NSURL URLWithString:#"http://dev-demo.info.bh-in-15.webhostbox.net/dv/nationalblack/upload/post/"]
placeholderImage:[UIImage imageNamed:string2]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
imagev.image = image;
}];
I am not getting any image inside ImageView
data I am getting from the server is
data array (
{
address = brisbane;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = delhi;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464935578;
email = "gautam.kumar#eyeforweb.com";
expirydays = 366;
expirymail = 0;
"fb_address" = "";
id = 78;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-33.7961";
"link_address" = "";
lng = "151.146";
logo = "";
longdesc = "xyz ";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 13;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = hello123;
state = "New South Wales";
status = 1;
tags = "";
"tb_address" = "";
title = aayush;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 56;
"web_address" = "";
},
{
address = "Address 1";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = ABD;
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464158696;
email = "gautam.kumar#eyeforweb.com";
expirydays = 357;
expirymail = 0;
"fb_address" = "";
id = 75;
"inst_address" = "";
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = "";
lng = "144.592";
logo = "appflowchart_4c1.gif";
longdesc = "This is short Description.";
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = "";
sevendaysmail = 0;
shortdesc = "This is short Description.";
state = Gisborne;
status = 1;
tags = "";
"tb_address" = "";
title = Business1;
transcationid1 = "";
"tw_address" = "";
userid = 5;
username = "Gautam Kumar";
"var_name" = 0;
"web_address" = "";
},
{
address = "Paschim Vihar ,Delhi";
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1464065014;
email = "gautam.kumar#eyeforweb.com";
expirydays = 356;
expirymail = 0;
"fb_address" = Facebook;
id = 72;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "-37.488";
"link_address" = linked;
lng = "144.592";
logo = "Screenshot_(1)_61b.png";
longdesc = sdfsdfdsf;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = fffsdf;
state = Gisborne;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "First business";
transcationid1 = "";
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
},
{
address = Laxminagar;
amount = 0;
"business_phone" = 9990688436;
catid = 0;
catname = "";
city = "New Delhi1";
contactperson = "Gautam Kumar";
country = Australia;
createdon = 1463651418;
email = "gautam.kumar#eyeforweb.com";
expirydays = 7;
expirymail = 0;
"fb_address" = Facebook;
id = 61;
"inst_address" = Instagram;
isexpired = 0;
isfeatured = 0;
lat = "28.6433";
"link_address" = linked;
lng = "77.0363";
logo = "Screenshot_(1)_0ba.png";
longdesc = asxasxasx;
mobileno = "";
officephone = "";
ondedaysmail = 0;
"package_name" = 0;
paidamount1 = 0;
paydate1 = 0;
paystatus1 = 1;
"prod_name" = 3;
"pt_address" = Pinsta;
sevendaysmail = 0;
shortdesc = xasxasx;
state = Victoria;
status = 1;
tags = "";
"tb_address" = Tumbler;
title = "Testing by Gautam";
transcationid1 = 1111111111111;
"tw_address" = Twitter;
userid = 5;
username = "Gautam Kumar";
"var_name" = 2;
"web_address" = Website;
}
)
Aayush Katiyar,
From iOS 8 onwards you are not supposed to use http you should make use of secure channels https. In case you dont have one consider adding these to your plist
<key>NSAppTransportSecurity</key>
<dict>
<key>NSAllowsArbitraryLoads</key>
<true/>
</dict>
All your image download api is making use of http:// I guess that might be the issue here
Finally change the way you load the image as
[imagev sd_setImageWithURL:[NSURL URLWithString: [NSString stringWithFormat:#"%#/%#",#"http://dev-demo.info.bh-in-15.webhostbox.net/dv/nationalblack/upload/post/", string2]]
placeholderImage:[UIImage imageNamed:#"Some_Placeholder_Image"]
completed:^(UIImage *image, NSError *error, SDImageCacheType cacheType, NSURL *imageURL) {
imagev.image = image;
}];
Just use like this,
[cell.myImageView sd_setImageWithURL:finalImageUrl];
finalImageUrl is your final url for download image.
No need to use method with completion handlerl. it is for different task.
Related
please tell me how to unwrap this josn response because of optional json i am not able to parse in label
i have tried my best but i am new to swift so i can't get it to unwrap the optional json
response::
Optional(<__NSArrayM 0x600000848340>(
{
contributors = "";
coordinates = "";
"created_at" = "Thu Jul 12 11:49:57 +0000 2018";
entities = {
hashtags = (
);
media = (
{
"display_url" = "pic.twitter.com/IJtq6aLM7K";
"expanded_url" = "";
id = 1017375504448479232;
"id_str" = 1017375504448479232;
indices = (
12,
35
);
"media_url" = "";
"media_url_https" = "";
sizes = {
large = {
h = 1820;
resize = fit;
w = 2048;
};
medium = {
h = 1067;
resize = fit;
w = 1200;
};
small = {
h = 604;
resize = fit;
w = 680;
};
thumb = {
h = 150;
resize = crop;
w = 150;
};
};
type = photo;
url = "";
}
);
symbols = (
);
urls = (
);
"user_mentions" = (
);
};
"extended_entities" = {
media = (
{
"display_url" = "pic.twitter.com/IJtq6aLM7K";
"expanded_url" = "";
id = 1017375504448479232;
"id_str" = 1017375504448479232;
indices = (
12,
35
);
"media_url" = "";
"media_url_https" = "";
sizes = {
large = {
h = 1820;
resize = fit;
w = 2048;
};
medium = {
h = 1067;
resize = fit;
w = 1200;
};
small = {
h = 604;
resize = fit;
w = 680;
};
thumb = {
h = 150;
resize = crop;
w = 150;
};
};
type = photo;
url = "";
}
);
};
"favorite_count" = 0;
favorited = 0;
geo = "";
id = 1017375507174719488;
"id_str" = 1017375507174719488;
"in_reply_to_screen_name" = "";
"in_reply_to_status_id" = "";
"in_reply_to_status_id_str" = "";
"in_reply_to_user_id" = "";
"in_reply_to_user_id_str" = "";
"is_quote_status" = 0;
lang = fr;
place = "";
"possibly_sensitive" = 0;
"retweet_count" = 0;
retweeted = 0;
source = "";
text = "Tweet Tweet ";
truncated = 0;
user = {
"contributors_enabled" = 0;
"created_at" = "Tue Mar 27 05:14:33 +0000 2018";
"default_profile" = 1;
"default_profile_image" = 0;
description = "";
entities = {
description = {
urls = (
);
};
};
"favourites_count" = 3;
"follow_request_sent" = 0;
"followers_count" = 1;
following = 0;
"friends_count" = 0;
"geo_enabled" = 1;
"has_extended_profile" = 0;
id = 978500498897563648;
"id_str" = 978500498897563648;
"is_translation_enabled" = 0;
"is_translator" = 0;
lang = en;
"listed_count" = 0;
location = "";
name = Mike;
notifications = 0;
"profile_background_color" = F5F8FA;
"profile_background_image_url" = "";
"profile_background_image_url_https" = "";
"profile_background_tile" = 0;
"profile_image_url" = "";
"profile_image_url_https" = "";
"profile_link_color" = 1DA1F2;
"profile_sidebar_border_color" = C0DEED;
"profile_sidebar_fill_color" = DDEEF6;
"profile_text_color" = 333333;
"profile_use_background_image" = 1;
protected = 0;
"screen_name" = Mike50430315;
"statuses_count" = 13;
"time_zone" = "";
"translator_type" = none;
url = "";
"utc_offset" = "";
verified = 0;
};
}
because of this i am getting nil value in all like name text retweet please tell me how to solve this
var timeline = (FHSTwitterEngine.shared().getTimelineForUser(FHSTwitterEngine.shared().authenticatedUsername, isID: true, count: 10), terminator: "")
from this line i am getting whole response
and then i have on array i create and store in to array like below
var serviceData = [AnyObject]()
let timelinedata = [timeline] as [AnyObject]
serviceData = (timelinedata)
print(serviceData)
In general, anything optional can be unwrapped like so:
let optionalValue: String? = "Hello, this is optional!"
if let noLongerOptional = optionalValue {
print("\(noLongerOptional) no its not! ahah")
}
Edit: more specific example...
Assuming you have a variable 'myJson' which hold your optional value... and you did:
print("\(myJson)")
You can solve this by:
if let validJson = myJson {
print("\(validJson)")
}
Edit 2: ... FHSTwitter... (updated.... this is getting long)
let twitterEngine = FHSTwitterEngine.sharedEngine()
let twitterUser = twitterEngine.authenticatedID
let timeline = twitterEngine.getTimelineForUser(twitterUser, isID: true, count: 10)
According to FHSTwitterEngine docs... getTimelineForUser() will return either a NSError or an array of Tweets.
so...
if let error = timeline as? Error {
print("Oops, looks like something went wrong: \(error)")
} else {
if let tweets = timeline as? [Any] {
for tweet in tweets {
print("This is a tweet: \(tweet)")
}
}
}
If you have any more trouble using FHSTwitterEngine, I suggest you play with: https://github.com/natesymer/FHSTwitterEngine/tree/master/FHSTwitterEngineDemoSwift/Demo-Swift
Or open a support ticket with the FHSTwitterEngine developer(s) at: https://github.com/natesymer/FHSTwitterEngine/issues
Good Luck!
I have 2 Arrays named "onGoingBookings" and "sortedMSArray" . I want to inject / merge sortedMSArray (status key only) to onGoingBooings Array (main Array) when both booking id values are same.
Response of OngoingBookings
{
addrLine1 = "Al Thanyah Fifth, Dubai, United Arab Emirates";
addrLine2 = " ";
amount = "";
apntDate = "2017-12-11";
apntDt = "2017-12-11 11:48:18";
apntTime = "11:48 am";
apptLat = "25.071571350098";
apptLong = "55.14294052124";
bid = 374;
bookType = 1;
cancelAmount = 30;
"cancel_reason" = "";
"cat_name" = "Car Wash";
"dispute_msg" = "";
disputed = "";
dt = 20171211114818;
email = "dev#ios.com";
fdata = {
};
fname = Apple;
lname = Mob;
notes = "";
pPic = "https://s3.amazonaws.com/iserve/ProfileImages/dev#ios.com2017-11-2711:34:26.jpg";
phone = 561462146;
pid = 48;
"star_rating" = 0;
statCode = 6;
status = "Job started.";
},
{
addrLine1 = "Al Thanyah Fifth, Dubai, United Arab Emirates";
addrLine2 = " ";
amount = "";
apntDate = "2017-12-06";
apntDt = "2017-12-06 19:29:14";
apntTime = "07:29 pm";
apptLat = "25.071369171143";
apptLong = "55.143840789795";
bid = 354;
bookType = 2;
cancelAmount = 50;
"cancel_reason" = "";
"cat_name" = Plumbing;
"dispute_msg" = "";
disputed = "";
dt = 20171206192914;
email = "";
fdata = {
};
fname = "";
lname = "";
notes = "";
pPic = "";
phone = "";
pid = "";
"star_rating" = 0;
statCode = 1;
status = "Job Pending";
},
{
addrLine1 = "Al Thanyah Fifth, Dubai, United Arab Emirates";
addrLine2 = " ";
amount = "";
apntDate = "2017-12-06";
apntDt = "2017-12-06 19:24:12";
apntTime = "07:24 pm";
apptLat = "25.071369171143";
apptLong = "55.143840789795";
bid = 353;
bookType = 1;
cancelAmount = 30;
"cancel_reason" = "";
"cat_name" = "Car Wash";
"dispute_msg" = "";
disputed = "";
dt = 20171206192412;
email = "";
fdata = {
};
fname = "";
lname = "";
notes = "";
pPic = "";
phone = "";
pid = "";
"star_rating" = 0;
statCode = 1;
status = "Job Pending";
},
Response of sortedMSArray
{
bookingid = 325;
status = 1;
},
{
bookingid = 333;
status = 3;
},
{
bookingid = 374;
status = 3;
}
I need Following Solution
Step 1 - compare both array by using #"bid"(ongoingbookings) and #"bookingid"(sortedMSArray)
Step 2 - merge the status key when both booking ids are same.
Please post a code snipped according to my code and response.
Reference Codes
if(requestType == RequestTypeGetAllApptDetails)
{
if(pageIndex == 0)
{
pastBookings = [[NSMutableArray alloc]init];
onGoingBookings = response[#"ongoing_appts"];
NSLog(#"CHECKINGFAST%#",onGoingBookings);
}
[pastBookings addObjectsFromArray:response[#"past_appts"]];
self.tableView.backgroundView = self.messageView;
[self.tableView reloadData];
}
else if(requestType == RequestTypeGetReportMaterialStatus)
{ // NSArray *custStatusTempArray = response;
customerStatusArray = response;
customerstatusDict = response[#"customerstatus"];
NSLog(#"CUSTOMERSTATUSARRAY %#", customerStatusArray);
NSLog(#"CUSTOMERSTATUSDICT %#", customerstatusDict);
if(customerStatusArray == nil || [customerStatusArray count]==0)
{
NSLog(#"NO MATERIAL ACCEPTED");
}
else
{
custStatusFilteredArray = [NSMutableArray array];
if([customerstatusDict isKindOfClass:[NSDictionary class]])
{
NSDictionary *dict = (NSDictionary *)customerstatusDict;
[dict enumerateKeysAndObjectsUsingBlock:^(id _Nonnull key, id _Nonnull obj, BOOL * _Nonnull stop) {
[custStatusFilteredArray addObject:obj];
NSLog(#"FILTEREDARRAY%#",custStatusFilteredArray);
}];
}
materialStatusStringArray = [custStatusFilteredArray copy];
NSLog(#"materialStatusStringarray%#",materialStatusStringArray);
//sorting the materialstatus string array
NSSortDescriptor* sortDescriptor = [NSSortDescriptor sortDescriptorWithKey:#"bookingid" ascending:NO];
sortedMSArray = [materialStatusStringArray sortedArrayUsingDescriptors:#[sortDescriptor]];
NSLog(#"Sorted Array Response -%#", sortedMSArray);
How can I populate a few UILabels on a ViewController from the JSON object I receive from a previously passed id parameter? I get the response from the server but, I don't know how to populate the key/value pairs to a UILabel.
The JSON response I get is:
{
product = {
attributes = (
);
"average_rating" = "0.00";
backordered = 0;
"backorders_allowed" = 0;
"button_text" = "";
"catalog_visibility" = visible;
categories = (
);
"created_at" = "2016-02-23T05:00:55Z";
"cross_sell_ids" = (
);
description = "<p>Microsoft Office</p>\n";
dimensions = {
height = "";
length = "";
unit = in;
width = "";
};
"download_expiry" = 0;
"download_limit" = 0;
"download_type" = "";
downloadable = 0;
downloads = (
);
featured = 0;
"featured_src" = "https://qashop.taxometry.com/wordpressv4/wp-content/uploads/2016/02/softwarecontract-150x150.jpg";
"grouped_products" = (
);
id = 15;
images = (
{
alt = "";
"created_at" = "2016-02-23T05:01:35Z";
id = 16;
position = 0;
src = "https://qashop.taxometry.com/wordpressv4/wp-content/uploads/2016/02/softwarecontract-150x150.jpg";
title = "softwarecontract-150×150";
"updated_at" = "2016-02-23T05:01:35Z";
}
);
"in_stock" = 1;
"managing_stock" = 0;
"menu_order" = 0;
"on_sale" = 1;
parent = (
);
"parent_id" = 0;
permalink = "https://qashop.taxometry.com/wordpressv4/product/software-contract/";
price = 25;
"price_html" = "<del><span class=\"amount\">$30.00</span></del> <ins><span class=\"amount\">$25.00</span></ins>";
"product_url" = "";
"purchase_note" = "";
purchaseable = 1;
"rating_count" = 0;
"regular_price" = 30;
"related_ids" = (
);
"reviews_allowed" = 1;
"sale_price" = 25;
"shipping_class" = "";
"shipping_class_id" = "<null>";
"shipping_required" = 1;
"shipping_taxable" = 1;
"short_description" = "";
sku = 2370;
"sold_individually" = 0;
status = publish;
"stock_quantity" = "<null>";
tags = (
);
"tax_class" = "";
"tax_status" = taxable;
taxable = 1;
title = "Software Contract";
"total_sales" = 5;
type = simple;
"updated_at" = "2016-02-23T05:01:41Z";
"upsell_ids" = (
);
variations = (
);
virtual = 0;
visible = 1;
weight = "<null>";
};
}
Try this - > First
then Second
JSON OUTPUT:
category = (
{
"category_id" = 1;
column = 0;
description = "";
image = "images/Car Wash.jpg";
"meta_description" = "";
"meta_keyword" = "";
name = "Car Wash";
"parent_id" = "";
"sort_order" = 0;
status = enable;
subcategory = (
{
"category_id" = 6;
column = 0;
description = "";
image = "images/hatchpack.jpg";
"meta_description" = "";
"meta_keyword" = "";
name = hatchpack;
"parent_id" = 1;
"sort_order" = 0;
status = enable;
subcategory = (
);
top = "";
}
);
top = "";
},
{
"category_id" = 2;
column = 0;
description = "";
image = "images/Pest Control.png";
"meta_description" = "";
"meta_keyword" = "";
name = "Pest Control";
"parent_id" = "";
"sort_order" = 0;
status = enable;
subcategory = (
);
top = "";
},
{
"category_id" = 3;
column = 0;
description = "";
image = "images/Electrician.jpg";
"meta_description" = "";
"meta_keyword" = "";
name = Electrician;
"parent_id" = "";
"sort_order" = 0;
status = "";
subcategory = (
);
top = "";
},
{
"category_id" = 4;
column = 0;
description = "";
image = "images/Washing Machine.jpg";
"meta_description" = "";
"meta_keyword" = "";
name = "Washing Machine";
"parent_id" = "";
"sort_order" = 0;
status = "";
subcategory = (
);
top = "";
},
{
"category_id" = 5;
column = 0;
description = "";
image = "images/TV Repair.png";
"meta_description" = "";
"meta_keyword" = "";
name = "TV Repair";
"parent_id" = "";
"sort_order" = 0;
status = enable;
subcategory = (
);
top = "";
},
{
"category_id" = 6;
column = 0;
description = "";
image = "images/hatchpack.jpg";
"meta_description" = "";
"meta_keyword" = "";
name = hatchpack;
"parent_id" = 1;
"sort_order" = 0;
status = enable;
subcategory = (
);
top = "";
}
);
success = 1;
}
MY CODE:
for(NSDictionary *DicHoleCategories in ArrCategory)
{
[DicAllValues setObject:[DicHoleCategories objectForKey:#"subcategory"] forKey:#"subcategory"];
[ArrName addObject:DicAllValues];
}
//did select row at indexpath method//
subCategory = [[ArrName objectAtIndex:indexPath.row] objectForKey:#"subcategory"];
if(subCategory==nil||[subCategory isEqual:#""])
{
productScreen *screen = [[productScreen alloc]init];
screen = [self.storyboard instantiateViewControllerWithIdentifier:#"product"];
[self presentViewController:screen animated:YES completion:nil];
}
else
{
CarDetailsVC *car = [[CarDetailsVC alloc]init];
car=[self.storyboard instantiateViewControllerWithIdentifier:#"category"];
[self presentViewController:car animated:YES completion:nil];
}
Here I have mentioned my code properly,getting the subcategory values has been done and I have comparing the values is null or the string is empty,but only else part is working what I have to do please any one help me.
for(NSDictionary *DicHoleCategories in ArrCategory)
{
[DicAllValues setObject:[DicHoleCategories objectForKey:#"subcategory"] forKey:#"subcategory"];
[ArrName addObject:DicAllValues];
}
//did select row at indexpath method//
NSArray *subCategory=[[ArrName objectAtIndex:indexPath.row] objectForKey:#"subcategory"];
if(subCategory.count ==0)//subcategory is an array
{
productScreen *screen=[[productScreen alloc]init];
screen =[self.storyboard instantiateViewControllerWithIdentifier:#"product"];
[self presentViewController:screen animated:YES completion:nil];
}
else
{
CarDetailsVC *car=[[CarDetailsVC alloc]init];
car=[self.storyboard instantiateViewControllerWithIdentifier:#"category"];
[self presentViewController:car animated:YES completion:nil];
}
You have given && condition inside if statement. Both conditions can't be true simultaneously. Moreover, check your string with isEqualToString method.
So put your if condition as given below -
if([subcategory length] ==0){
// Your code goes here.
}
I've managed to export the below data, multiplied by several hundred, into an NSDictionary. I now need to build out a way to put this data into Tinder style app. Can anyone advise how I can get my app to pull out the data against Key "Title" for various indexes. Currently it pulls out 45 records of data containing that one Title as there are 45 keys in my data set.
{
AttachmentFiles = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/AttachmentFiles";
};
};
Attachments = 0;
AuthorId = 22;
AverageRating = "<null>";
BestAnswerId = "<null>";
Body = "We need to think xyz";
CategoriesLookupId = 16;
Community = "<null>";
ContentType = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/ContentType";
};
};
ContentTypeId = 0x01200200C5BB1FEE2601B9439CD527C288D85A7B;
Created = "2014-03-21T08:37:33Z";
DescendantLikesCount = 8;
DescendantRatingsCount = "<null>";
DiscussionLastUpdated = "2014-06-19T12:57:58Z";
EditorId = 96;
EmailSender = "<null>";
FieldValuesAsHtml = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/FieldValuesAsHtml";
};
};
FieldValuesAsText = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/FieldValuesAsText";
};
};
FieldValuesForEdit = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/FieldValuesForEdit";
};
};
File = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/File";
};
};
FileSystemObjectType = 1;
FilterCategory = "<null>";
FirstUniqueAncestorSecurableObject = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/FirstUniqueAncestorSecurableObject";
};
};
Folder = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/Folder";
};
};
GUID = "28144fd4-84b0-434b-9e99-01d939e6a773";
Has20likes = "<null>";
ID = 3;
Id = 3;
IsFeatured = 0;
IsIdeaCreated = "<null>";
IsQuestion = 0;
LastReplyById = 49;
LikesCount = 5;
MemberLookupId = 7;
Modified = "2015-03-11T15:25:20Z";
"OData__UIVersionString" = "2.0";
ParentItemEditorId = "<null>";
ParentItemID = "<null>";
ParentList = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/ParentList";
};
};
Popularity = "7.23632608186099";
RatingCount = "<null>";
RoleAssignments = {
"__deferred" = {
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)/RoleAssignments";
};
};
StepChangePillar = "<null>";
Title = "JIRA Governance";
"__metadata" = {
etag = "\"14\"";
id = "Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)";
type = "SP.Data.Community_x0020_DiscussionListItem";
uri = "https://xxxxxxx/_api/Web/Lists(guid'1594ea5e-0ca7-4de3-81aa-4082bde336a4')/Items(3)";
};
},
Thanks
You should have an array of dictionaries correct?
If so this should work:
NSInteger index = 0; //You can set this to the current page of your scroll view
NSArray * items = /* YOUR ARRAY OF DICTIONARIES */;
NSDictionary * dict = [items objectAtIndex:index];
NSString * title = [dict objectForKey:#"Title"];
You might also consider making a subclass of NSObject and building in a parser for your dictionary so you can access the variables with strong types.