« first day (1492 days earlier)      last day (1448 days later) » 

02:17
Can anybody know how to achieve this?
0
Q: Move PHAsset from one Album to Another (Swift)

Sohil R. MemonI want to move a PHAsset from one Album to another album. Here is what I am doing: func saveImage(image: UIImage, album: PhotoAlbum, completion: (PHFetchResult?)->()) { var placeholder: PHObjectPlaceholder? PHPhotoLibrary.sharedPhotoLibrary().performChanges({ // Reque...

 
1 hour later…
03:24
Hai All
When i am sending the values to server from my iOS, in php backend they are getting as String values.
Is there any other way to get the JSON format in the iOS?
03:36
my code is
i need to get the json values as output
04:25
gud mrng everyone
hi @BhavinRamani
Good morning all :)
04:42
Good morning..
05:39
@all good morning
hey guys Goodmorng :-)
@purushotham what response you are getting
05:55
[annotationView addSubview:pinButton];
when i add this button view to my annotation view in view for annotation
i am getting as String @ Sandy
then didSelectAnnotationView is not called
but need to convert that into json
@sandy @all Hi All in my project i have newly added cocoapods, and pod frameworks are working fine for me(My Mac), But the same source getting error in some others mac, Please check this error,"../.../.../AFHTTPSessionManager.h/AFNetworking". Can anyone help me out of this issue?
@purushotham okay first check your response is in json format or not by this jsonlint.com
if it is then by use of NSJSONSerialization you can get this
06:01
@sandy
@sathis some time due to link error
@pooja_1205 hey
@sandy wen i add button view as subview to annottaion view
@sathis relink that framework again
@pooja_1205 ok
then didselectannotation view is not working
@pooja_1205 show me your code
06:03
ok @Sandy, i ll check and let u know
@purushotham okay
@sandy thanks for response, delink means? need to reinstall cocoapods?
@sandy
@sathis no just search that error in google what you are getting, you will get more solution easily
@pooja_1205 oky let me check
06:07
@sandy : getting string value in response
@purushotham have you validate your response with that link
do it once
ok
@sandy : i am send the responce , pastebin.com/ftywFHzJ
06:14
@purushotham okay i will check once after pooja's code
ok @sandy
@pooja_1205 why you are using button you can use pinView.image= also instead of button
i hv to create a custom pin
round in shape with the country name written in it
so i used a button setting its corner radius
@pooja_1205 oky let me show you a good example for same try this one and this is good way to implement custom annotationView
and on btn i added a label of country
06:26
14
Q: How to create Custom MKAnnotationView and custom annotation title and subtitle

Abhishek I need to create above Annotation view on MKMapView. I am able to create the custom annotation view but on the tap of annotation the view need to be opened image with that big text, I am not able to create that one. Please provide me some links or the way to do this task.

i tried this @sandy
okay
but how to create a custom image then
custom image means?
i ll show u screen shot
06:30
have you check with break point on didselectannotationview ?
yes
its not going there
oky show me
and if i remove that btn view
then it works
@pooja_1205 show me what you want
ok @sandy
06:45
@sandy: did u check that?
@purushotham okay give me few second
@sandy
like this i want
there will be only 1 annotation on th emap
@purushotham send me again not able to open that one
@pooja_1205 okay so the image will be same right not going to change?
06:50
no
only th ename inside it will chnage
for that i added label inside btn
@sandy
@pooja_1205 okay let me check this at my side
@pooja_1205 one more point user able to click on whole custom image right ?
06:52
@purushotham oky
@purushotham give me fem minutes
ok @sandy
@purushotham i am asking for response
only
can you show me that
ok
questionarray ?
right
06:58
posted on September 09, 2016 by Johann

ComplimentaryGradientView is an open source library from George Kye for creating gradient views based on the colors within a supplied image. Gradients created with ComplimentaryGradientView are great for use as image backgrounds. There are a number of different gradient types, and you can control the direction of the gradient. Here’s an image from the readme […]

ok
@purushotham your response is not in json fromat
so you have to change this
yes it is coming in string format
can u suggest the update , where i have to change
in the code
@purushotham you can see the answer of that question
07:05
yes
you have to use NSJSONSerialization JSONObjectWithData
when you getting your respone
this will change your response data in to json format
ok
thanks @sandy
welcome
@pooja_1205 i have to go for lunch so after that i will give you a sample code on same
ok @sandy
07:32
hi @ShobhakarTiwari
 
1 hour later…
08:38
@sandy hv u found any demo for it
08:55
@ShobhakarTiwari
09:19
@pooja_1205 ?
09:42
how to open callout view on click of button added as subview to annotation view in mapview
@ShobhakarTiwari
@pooja_1205 wat u mean callout view
i dint get the scenario
@sand: hai
this is the code @ShobhakarTiwari
instead of adding image i m adding buttonas a subview to annotation pin
@iApple: hai
09:52
and wen i tap on that button
didselect annotation is not called
to show the annotation view @ShobhakarTiwari
i tried adding tap gesture and button action as well
but nothing worked
Hi @purushotham
0
Q: convert string data to json Array in Iphone

purushothamWhen i am sending the values to server from my iOS, in php backend they are getting as String values. Is there any other way to get the JSON format in the iOS? My iOS code is: - (IBAction)btnSaveAction:(id)sender { int arrayCount; NSMutableDictionary *question_array = [[NSMutableDictio...

getting the string format and need to convert in to json : can u go through the code @iApple
i am getting repsonse as pastebin.com/ftywFHzJ @iApple
@purushotham write all data in json format and write to any file having extension .json
in document directory
can u explain in detail@ShobhakarTiwari , once see the code
@pooja_1205 No i just came from meeting let me do this now. Have you found any solution ?
@purushotham hey
10:07
no @sandy not yet
hai @sandy, when i am trying getting error
@purushotham what error
?
@pooja_1205 oky
If you are sending any static values to server then u can follow Shobhakar Tiwari suggestion. @purushotham
error is : +[NSJSONSerialization dataWithJSONObject:options:error:]: Invalid top-level type in JSON write' @sandy
check this , stackoverflow.com/questions/4456966/… @purushotham
the same approach for GET also
10:24
@purushotham oky
An object that may be converted to JSON must have the following properties:

The top level object is an NSArray or NSDictionary.
All objects are instances of NSString, NSNumber, NSArray, NSDictionary, or NSNull.
All dictionary keys are instances of NSString.
Numbers are not NaN or infinity.
once see the my code and can u tell the changes @sandy
@sandy Purushotam is 3yr expertise in iOS Development so i dont think he is not aware of this
thanks @sandy
thanks @ShobhakarTiwari
i got it
welcome man
10:28
@ShobhakarTiwari i don't know about his experience :-)
@sandy @ShobhakarTiwari any idea how shud resolve this issue
10:45
@pooja_1205 remove button use gesture once
gesture on button touch right ?
@ShobhakarTiwari
simple gesture tap wali
where shud i add this
i want annotation view to come on selection of annotation pin
and there i hv tried it
10:49
then is it not firing
code dikha
hey i am not 3 yrs years exp yar @sandy
@ShobhakarTiwari : i am not 3 yrs exp
@purushotham but u mention 3yr exp in ur profile
@pooja_1205 u wnt to add image to annotionview
11:00
yes
but that wud be custom image
screen shot i hv shared above
@purushotham :-D
i am fresher :-D i like to be always
nooo that is by mistake only , sry @ShobhakarTiwari
@pooja_1205 When you want to use your own image for an annotation view, you should create an MKAnnotationView
instead of an MKPinAnnotationView
@purushotham let it be , make it correct
whr r u from ?
chennai
@ShobhakarTiwari how much u have experience and where r u from ?
11:07
New Delhi
completed 11 mnths and from chennai @sandy
@ShobhakarTiwari great me too
@ShobhakarTiwari plz check my code once
i hv created annotation view
then u should use its image property
no need to do anything
let me share u link
93
A: MKMapView: Instead of Annotation Pin, a custom view

AnnaWhen you want to use your own image for an annotation view, you should create an MKAnnotationView instead of an MKPinAnnotationView. MKPinAnnotationView is a subclass of MKAnnotationView so it has an image property but it generally overrides that and draws a pin image (that's what it's for). So...

Read first it before implementation
Process important more than the implementation
11:11
ok @ShobhakarTiwari
pastebin.com/qbn1C5CD @ShobhakarTiwari
plz check this once i think i m making some mistake here
in view did load
then in viewfor annotation i m adding that button as subview to annotation view
@ShobhakarTiwari
-2
Q: Add character at start and end of SubString from String in iOS Swift

Sanchit PaurushI am working on a project where I need to add character at start and end of substring from String. Example Given String "Hello http://google.com Google." Result should be "Hello <a href="http://www.google.com"></a> The site for google." Please note I am not sure about the location of substrin...

11:34
@pooja_1205 whr u set callout to yes
in viewfor annotation
annotationView.canShowCallout = true;
@ShobhakarTiwari
not working ?
no
if i remove that btn from subview then it works @ShobhakarTiwari
u wnt to chng it on btn touch
?
yeah i tried that
but that method is not called
there is only one annoation on map
so any solution will work @ShobhakarTiwari
@ShobhakarTiwari
any jugaad that can work for now
11:54
@pooja_1205 wait
3
A: MapKit not showing custom Annotation pin image on iOS9

Harshal WaniFollowing code works perfectly on all iOS 6 to iOS 9 devices: - (MKAnnotationView *)mapView:(MKMapView *)mapView viewForAnnotation:(id<MKAnnotation>)annotation { // create a proper annotation view, be lazy and don't use the reuse identifier MKAnnotationView *view = [[MKAnnotationView...

@ShobhakarTiwari
is it right way to add
[annotationView addSubview:pinButton];
try once its work or not
dint try for long time
by doing this this is added in that coordinate
but didselect annotation is not working
onthi sbtn click
@ShobhakarTiwari
12:14
@ShobhakarTiwari this doesnt work
12:46
Hey, everyone. I'm stuck on this problem and I had a few problems. I was originally going to make a post, but I have to admit it's rather complicated and very long to explain everything in detail.

There seem to be quite a few problems on this, but the solutions I've tried so far don't work quite well.

Essentially, I have a CustomCell that I want to add programmatically to this UICollectionView that I've generated programmatically. The thing is that it works, however the way I've built the custom cell without IBOutlets and use addSubview to add my UILabel and UIImage to my CustomCell. It w
13:05
@RugDealer Code? Are you correctly using the reuseIdentifier? How are you creating the new cell? Why can't you just create it in the collection view?
13:27
@Abizern I'm currently an apprentice at this web company and I'm only here for another year. I'm taking care of their tvOS app (as well as iOS app later on).

They want me to make the app as generic as possible so that if they want to dynamically add more collection views (aka: categories) they just have to change the JSON data and not go in the app I made to make any modifications.

Af for the reuseIdentifier, I am using it correctly (I think). Here is some code examples:

class CategoryCell: UICollectionViewCell {
Here is my ViewController method createCollection where when I create a collection I set the reuseIdentifier. I have two different type of UICollectionCells FotmCell and CategoryCell. As of right now, FotmCell is not important.

func createCollectionView(title: String, collectionViewId: Int){


//Need to check if we need to create multiple FlowLayouts or just one.
let flowLayout = UICollectionViewFlowLayout()

let space = 5.0 as CGFloat

if(collectionViewId == 0){
//Collection view for Fotm cell's
If you want me to break the examples down further let me know, or if you have any questions on what I'm doing let me know as well.
haha And just ignore some of my comments xD, I commented parts I thought may be unsafe and that I need to fix when it's functional
13:46
@RugDealer Why are you using unique reuseIdentifiers?
And code is hard to read in a chat room. For future reference put it an something like gist.github.com where spacing and syntax highlighting are applied.
Well, I haven't been dev'ing iOS for very long, I'm still learning a lot as I go. I noticed that I didn't have to create unique identifier for each collection view. Reason why I put the String(index) in comment.

That is what you were pointing out?

Sure thing, I'll post it in gist.github.com.
https://gist.github.com/Grimbode/bc0d73e61de1706e75d05c8f2ebed502
https://gist.github.com/Grimbode/6adab4db5f6b6032dd8c499af8bf1880
If you need more files let me know.
And if you have any pointers, I'd much appreciate it. :)
 
4 hours later…
18:12
@RugDealer That's a lot of code. I'm sorry, there are quite a few odd things in there. I appreciate you're new so I'll give you a couple of tips. properties start with a lower case. Don't do network requests in the cell, it breaks MVC. There is no point having unique reuse identifiers, because you aren't reusing cell in that case, you are creating one for each row.
An array of collection views? It might be better having a single collection view with separate sections instead.
Easy on the force unwraps. Don't use it as a way to get around dealing with optionals properly.

« first day (1492 days earlier)      last day (1448 days later) »